4.2.4 批量提交区块信息
1、接口描述:用于批量提交区块信息
2、接口地址:/api/openapi/v1/chain/block/batchSave
3、请求方式:POST
4、consumes:["application/json"]
5、produces:["/"]
6、请求示例:
[
{
"blockHash": "0x0000000",
"blockHeight": 1000,
"blockSize": 123,
"blockTime": "2023-05-05 11:11:11",
"miner": "0x0000000",
"parentBlockHash": "0x0000000",
"txCount": 10
}
]
7、请求参数:
参数名称 | 参数说明 | in | 必填 | 数据类型 | schema |
accessKey | accessKey | header | true | string | |
blockInfoReqVOList | blockInfoReqVOList | body | true | array | BlockInfoReqVO |
schema属性说明
BlockInfoReqVO
参数名称 | 参数说明 | in | 是否必须 | 数据类型 | schema |
blockHash | 区块hash:长度限制100 | body | true | string | |
blockHeight | 区块高度 | body | true | number | |
blockSize | 区块大小(bytes) | body | false | integer(int64) | |
blockTime | 落块时间 | body | true | string | |
miner | 区块签名者:长度限制100 | body | false | string | |
parentBlockHash | 父区块hash:长度限制100 | body | false | string | |
txCount | 区块内交易数量 | body | false | integer(int32) |
8、响应示例
{
"code": 0,
"data": {},
"message": "MSG_00_0000"
}
9、响应参数:
参数名称 | 参数说明 | 类型 | schema |
code | code | integer(int32) | integer(int32) |
data | data | object | |
message | message | string |