SolidPeer

getblockcount

Returns the height of the most-recently validated block on this node.

Parameters

None.

Returns

An integer: block height of the current chain tip.

Example

Request:

curl https://solidpeer.io/bchn/mainnet/<token> \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getblockcount","params":[]}'

Response:

{ "jsonrpc": "2.0", "id": 1, "result": 882357 }

Notes

  • Counts validated blocks, not header-tip-only blocks. Headers received but not yet fully validated don't bump the count.
  • Genesis block is height 0.
  • During initial-block-download on a freshly-bootstrapped node this returns the partial-sync height; pair with getblockchaininfo (which surfaces verificationprogress) to distinguish "synced" from "syncing".

Cost

200 CC on mainnet; 100 CC on testnets/regtest.