blockToJSON

Block description to JSON

Synopsis

Declared in <rpc/blockchain.h>

[[locks_excluded(0x7f2e2991a010)]]
UniValue
blockToJSON(
    node::BlockManager& blockman,
    CBlock const& block,
    CBlockIndex const& tip,
    CBlockIndex const& blockindex,
    TxVerbosity verbosity,
    uint256 pow_limit);

Return Value

A JSON representation of the block.

Parameters

NameDescription
blockmanThe block manager used to read block data from disk.
blockThe block to serialize.
tipThe current chain tip, used to compute confirmations.
blockindexThe block index entry of block.
verbosityHow much per-transaction detail to include.
pow_limitThe proof-of-work limit used to compute difficulty.