获取节点的同步状态.
参数
无参数
返回值
Object|Boolean,同步状态的对象,或者没有同步时返回FALSE。同步状态对象信息包括:
名称 | 数据类型 | 描述 |
---|---|---|
startingBlock | QUANTITY | 同步起始块 |
currentBlock | QUANTITY | 当前区块 |
highestBlock | QUANTITY | 要同步的最高区块 |
示例
curl -X POST 'https://api.shasta.trongrid.io/jsonrpc' --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":64}'
结果
{
"jsonrpc": "2.0",
"id": 64,
"result": {
"startingBlock": "0x20e76cc",
"currentBlock": "0x20e76df",
"highestBlock": "0x20e76e0"
}
}