Skip to main content

getbestchainlock

Returns the block hash of the best chainlock. Throws an error if there is no known chainlock yet.

yerbas-cli getbestchainlock

Output

ResultTypeDescription
"blockhash" : "hash"(string)The block hash hex encoded
"height"(number)The block height or index
"known_block" : truefalse(boolean)True if the block is known by our node
Result:
{
"blockhash" : "hash", (string) The block hash hex encoded
"height" : n, (numeric) The block height or index
"known_block" : true|false (boolean) True if the block is known by our node
}

Examples

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/