getSyncStatus
返回指定群组内的同步状态信息
参数
groupID
:unsigned int
- 群组ID
返回值
object
- 同步状态信息,字段如下:blockNumber
:unsigned int
- 最新区块高度genesisHash
:string
- 创世块哈希isSyncing
:bool
- 正在同步标志knownHighestNumber
:unsigned int
- 此节点已知的当前区块链最高块高knownLatestHash
:string
- 此节点已知的当前区块链最高块哈希latestHash
:string
- 最新区块哈希nodeId
:string
- 节点的IDprotocolId
:unsigned int
- 协议ID号txPoolSize
:string
- 交易池中交易的数量peers
:array
- 已连接的指定群组内p2p节点,节点信息字段如下:blockNumber
:unsigned int
- 最新区块高度genesisHash
:string
- 创始区块哈希latestHash
:string
- 最新块哈希nodeId
:string
- 节点的ID
- 示例
- // Request
- curl -X POST --data '{"jsonrpc":"2.0","method":"getSyncStatus","params":[1],"id":1}' http://127.0.0.1:8545 |jq
- // Result
- {
- "id": 1,
- "jsonrpc": "2.0",
- "result": {
- "blockNumber": 0,
- "genesisHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "isSyncing": false,
- "knownHighestNumber":0,
- "knownLatestHash":"0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "latestHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "nodeId": "41285429582cbfe6eed501806391d2825894b3696f801e945176c7eb2379a1ecf03b36b027d72f480e89d15bacd43462d87efd09fb0549e0897f850f9eca82ba",
- "peers": [
- {
- "blockNumber": 0,
- "genesisHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "latestHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "nodeId": "29c34347a190c1ec0c4507c6eed6a5bcd4d7a8f9f54ef26da616e81185c0af11a8cea4eacb74cf6f61820292b24bc5d9e426af24beda06fbd71c217960c0dff0"
- },
- {
- "blockNumber": 0,
- "genesisHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "latestHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "nodeId": "87774114e4a496c68f2482b30d221fa2f7b5278876da72f3d0a75695b81e2591c1939fc0d3fadb15cc359c997bafc9ea6fc37345346acaf40b6042b5831c97e1"
- },
- {
- "blockNumber": 0,
- "genesisHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "latestHash": "0x4765a126a9de8d876b87f01119208be507ec28495bef09c1e30a8ab240cf00f2",
- "nodeId": "d5b3a9782c6aca271c9642aea391415d8b258e3a6d92082e59cc5b813ca123745440792ae0b29f4962df568f8ad58b75fc7cea495684988e26803c9c5198f3f8"
- }
- ],
- "protocolId": 265,
- "txPoolSize": "0"
- }
- }
当前内容版权归 FISCO BCOS 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 FISCO BCOS .