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§
- The uniquely identifying hash of the target blockchain.
Constants§
- How many satoshis are in “one bitcoin”
- How many blocks between diffchanges
- How much time on average should occur between diffchanges
- The maximum allowed number of signature check operations in a block
- The maximum allowed weight for a block, see BIP 141 (network rule)
- Maximum allowed value for an integer in Script.
- The maximum allowed script size.
- The minimum transaction weight for a valid serialized transaction
- Mainnet (bitcoin) pubkey address prefix.
- Test (tesnet, signet, regtest) pubkey address prefix.
- Mainnet (bitcoin) script address prefix.
- Test (tesnet, signet, regtest) script address prefix.
- How may blocks between halvings.
- How many seconds between blocks we expect on average
- The factor that non-witness serialization data is multiplied by during weight calculation
Functions§
- Constructs and returns the genesis block
- The maximum value allowed in an output (useful for sanity checking, since keeping everything below this value should prevent overflows if you are doing anything remotely sane with monetary values).
- In Bitcoind this is insanely described as ~((u256)0 >> 32)