how to get latest block number
KevinLv24 opened this issue · 2 comments
KevinLv24 commented
if there is an api to get the latest block number?
lanhaoxiang commented
lanhaoxiang commented
curl -XPOST --data '{
"jsonrpc": "2.0",
"method": "call",
"params": [0, "get_dynamic_global_properties", []],
"id": 1
}' https://node1.gxb.io/rpc
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "2.1.0",
"head_block_number": 16639096,
"head_block_id": "00fde4782b6c91a7723a61e757a1ddbe479b548f",
"time": "2019-01-24T03:11:06",
"current_witness": "1.6.47",
"next_maintenance_time": "2019-01-24T03:40:00",
"last_budget_time": "2019-01-24T02:40:00",
"witness_budget": 2774976,
"accounts_registered_this_interval": 3,
"recently_missed_count": 0,
"current_aslot": 16839650,
"recent_slots_filled": "340282366920938463463374607431768211455",
"dynamic_flags": 0,
"last_irreversible_block_num": 16639082
}
}
head_block_number
is the latest block height, and last_irreversible_block_num
is latest irreversible block