Skip to main content

getblockcount

Command#

pacprotocol-cli getblockcount

Returns the number of blocks in the longest blockchain.

Examples#

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

Result#

n #(numeric) The current block count

Running following help command

pacprotocol-cli help getblockcount

Will produce following output:

getblockcount
Returns the number of blocks in the longest blockchain.
Result:
n (numeric) The current block count
Examples:
> pacprotocol-cli getblockcount
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:1111/