getchainstates

Back to blockchain

Summary

Return information about chainstates.

Description

Return information about chainstates.

Arguments

None.

Results

  • value (OBJ): No description.
  • headers (NUM): the number of headers seen so far
  • chainstates (ARR): list of the chainstates ordered by work, with the most-work (active) chainstate last
    • value (OBJ): No description.
    • blocks (NUM): number of blocks in this chainstate
    • bestblockhash (STR_HEX): blockhash of the tip
    • bits (STR_HEX): nBits: compact representation of the block difficulty target
    • target (STR_HEX): The difficulty target
    • difficulty (NUM): difficulty of the tip
    • verificationprogress (NUM): progress towards the network tip
    • snapshot_blockhash (STR_HEX, optional): the base block of the snapshot this chainstate is based on, if any
    • coins_db_cache_bytes (NUM): size of the coinsdb cache
    • coins_tip_cache_bytes (NUM): size of the coinstip cache
    • validated (BOOL): whether the chainstate is fully validated. True if all blocks in the chainstate were validated, false if the chain is based on a snapshot and the snapshot has not yet been validated.

Examples

qbit-cli getchainstates
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getchainstates", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8352/