5#ifndef BITCOIN_TEST_UTIL_MINING_H
6#define BITCOIN_TEST_UTIL_MINING_H
19struct BlockCreateOptions;
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.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
Block template creation options.
NodeContext struct containing references to chain state and connection state.
std::shared_ptr< CBlock > PrepareBlock(const node::NodeContext &node, const node::BlockCreateOptions &assembler_options)
Prepare a block to be mined.
COutPoint ProcessBlock(const node::NodeContext &, const std::shared_ptr< CBlock > &block)
Returns the generated coin (or Null if the block was invalid).
bool BuildChain(const node::NodeContext &node, const CBlockIndex *pindex, const CScript &coinbase_script_pub_key, size_t length, std::vector< std::shared_ptr< CBlock > > &chain)
Build a chain of length coinbase-only blocks on top of pindex (which need not be the active tip,...
COutPoint MineBlock(const node::NodeContext &, const node::BlockCreateOptions &assembler_options)
Returns the generated coin.
std::vector< std::shared_ptr< CBlock > > CreateBlockChain(size_t total_height, const CChainParams ¶ms)
Create a blockchain, starting from genesis.
COutPoint generatetoaddress(const node::NodeContext &, const std::string &address)
RPC-like helper function, returns the generated coin.