5#ifndef BITCOIN_INTERFACES_MINING_H
6#define BITCOIN_INTERFACES_MINING_H
58 virtual bool processNewBlock(
const std::shared_ptr<const CBlock>& block,
bool* new_block) = 0;
Serialized script, used inside transaction inputs and outputs.
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block te...
virtual ~Mining()=default
virtual bool testBlockValidity(const CBlock &block, bool check_merkle_root, BlockValidationState &state)=0
Check a block is completely valid from start to finish.
virtual bool processNewBlock(const std::shared_ptr< const CBlock > &block, bool *new_block)=0
Processes new block.
virtual bool isInitialBlockDownload()=0
Returns whether IBD is still in progress.
virtual unsigned int getTransactionsUpdated()=0
Return the number of transaction updates in the mempool, used to decide whether to make a new block t...
virtual std::optional< uint256 > getTipHash()=0
Returns the hash for the tip of this chain.
virtual std::unique_ptr< node::CBlockTemplate > createNewBlock(const CScript &script_pub_key, const node::BlockCreateOptions &options={})=0
Construct a new block template.
virtual bool isTestChain()=0
If this chain is exclusively used for testing.
virtual node::NodeContext * context()
Get internal node context.
std::unique_ptr< Mining > MakeMining(node::NodeContext &node)
Return implementation of Mining interface.
is a home for public enum and struct type definitions that are used by internally by node code,...
NodeContext struct containing references to chain state and connection state.