7#include <chainparams.h>
15#include <test/util/setup_common.h>
24 const Config &config = testing_setup->m_node.chainman->GetConfig();
34 testing_setup->m_node.chainman->ActiveChain().Tip();
69 .withCheckMerkleRoot(
false)));
70 assert(
cvstate.GetRejectReason() ==
"bad-txns-inputs-duplicate");
The block chain is a tree shaped structure starting with the genesis block at the root,...
CChainParams defines various tweakable parameters of a given instance of the Bitcoin system.
const Consensus::Params & GetConsensus() const
A mutable version of CTransaction.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
The basic transaction that is broadcasted on the network and contained in blocks.
unsigned int GetTotalSize() const
Get the total transaction size in bytes.
virtual const CChainParams & GetChainParams() const =0
Main entry point to nanobench's benchmarking facility.
void resize(size_type new_size)
static const uint64_t MAX_TX_SIZE
The maximum allowed size for a transaction, in bytes.
RecursiveMutex cs_main
Mutex to guard access to validation specific variables, such as reading or changing the chainstate.
uint256 BlockMerkleRoot(const CBlock &block, bool *mutated)
Compute the Merkle root of the transactions in a block.
uint32_t GetNextWorkRequired(const CBlockIndex *pindexPrev, const CBlockHeader *pblock, const CChainParams &chainParams)
static CTransactionRef MakeTransactionRef()
uint256 GetRandHash() noexcept
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
static constexpr Amount zero() noexcept
Parameters that influence chain consensus.
A TxId is the identifier of a transaction.
Amount GetBlockSubsidy(int nHeight, const Consensus::Params &consensusParams)
bool CheckBlock(const CBlock &block, BlockValidationState &state, const Consensus::Params ¶ms, BlockValidationOptions validationOptions)
Functions for validating blocks and updating the block tree.