Skip to main content

getbestchainlock

Command#

pacprotocol-cli getbestchainlock

Returns information about the best chainlock. Throws an error if there is no known chainlock yet.

Examples#

pacprotocol-cli getbestchainlock
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestchainlock", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/

Result#

{
"blockhash" : "hash", #(string) The block hash hex encoded
"height" : n, #(numeric) The block height or index
"signature" : "hash", #(string) The chainlock's BLS signature.
"known_block" : true|false #(boolean) True if the block is known by our node
}

Running following help command

pacprotocol-cli help getbestchainlock

Will produce following output:

getbestchainlock
Returns information about the best chainlock. Throws an error if there is no known chainlock yet.
Result:
{
"blockhash" : "hash", (string) The block hash hex encoded
"height" : n, (numeric) The block height or index
"signature" : "hash", (string) The chainlock's BLS signature.
"known_block" : true|false (boolean) True if the block is known by our node
}
Examples:
> pacprotocol-cli getbestchainlock
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestchainlock", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/