5#include <chainparams.h>
30 }
catch (
const std::ios_base::failure&) {
55 if (!block.
vtx.empty()) {
void SelectParams(const ChainType chain)
Sets the params returned by Params() to those for the given chain type.
const CChainParams & Params()
Return the currently selected parameters.
std::string ToString() const
std::vector< CTransactionRef > vtx
const Consensus::Params & GetConsensus() const
Minimal stream for reading from an existing byte array by std::span.
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
uint256 BlockWitnessMerkleRoot(const CBlock &block)
static int64_t GetBlockWeight(const CBlock &block)
int GetWitnessCommitmentIndex(const CBlock &block)
Compute at which vout of the block's coinbase transaction the witness commitment occurs,...
static size_t RecursiveDynamicUsage(const CScript &script)
static constexpr TransactionSerParams TX_WITH_WITNESS
Parameters that influence chain consensus.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
bool CheckBlock(const CBlock &block, BlockValidationState &state, const Consensus::Params &consensusParams, bool fCheckPOW, bool fCheckMerkleRoot)
Functions for validating blocks and updating the block tree.