Module constants

Expand description

Blockdata constants.

This module provides various constants relating to the blockchain and consensus code. In particular, it defines the genesis block and its single transaction.

Structs§

ChainHash
The uniquely identifying hash of the target blockchain.

Constants§

COINBASE_MATURITY
Number of blocks needed for an output from a coinbase transaction to be spendable.
DIFFCHANGE_INTERVAL
How many blocks between diffchanges.
DIFFCHANGE_TIMESPAN
How much time on average should occur between diffchanges.
MAX_BLOCK_SIGOPS_COST
The maximum allowed number of signature check operations in a block.
MAX_SCRIPTNUM_VALUE
Maximum allowed value for an integer in Script.
MAX_SCRIPT_ELEMENT_SIZE
The maximum allowed script size.
PUBKEY_ADDRESS_PREFIX_MAIN
Mainnet (bitcoin) pubkey address prefix.
PUBKEY_ADDRESS_PREFIX_TEST
Test (tesnet, signet, regtest) pubkey address prefix.
SCRIPT_ADDRESS_PREFIX_MAIN
Mainnet (bitcoin) script address prefix.
SCRIPT_ADDRESS_PREFIX_TEST
Test (tesnet, signet, regtest) script address prefix.
SUBSIDY_HALVING_INTERVAL
How may blocks between halvings.
TARGET_BLOCK_SPACING
How many seconds between blocks we expect on average.
WITNESS_SCALE_FACTOR
The factor that non-witness serialization data is multiplied by during weight calculation.

Functions§

genesis_block
Constructs and returns the genesis block.