5#ifndef BITCOIN_INTERFACES_MINING_H
6#define BITCOIN_INTERFACES_MINING_H
75 virtual std::optional<BlockRef>
getTip() = 0;
Serialized script, used inside transaction inputs and outputs.
Block template interface.
virtual std::vector< int64_t > getTxSigops()=0
virtual int getWitnessCommitmentIndex()=0
virtual std::vector< unsigned char > getCoinbaseCommitment()=0
virtual std::vector< CAmount > getTxFees()=0
virtual std::vector< uint256 > getCoinbaseMerklePath()=0
Compute merkle path to the coinbase transaction.
virtual bool submitSolution(uint32_t version, uint32_t timestamp, uint32_t nonce, CTransactionRef coinbase)=0
Construct and broadcast the block.
virtual CBlock getBlock()=0
virtual CBlockHeader getBlockHeader()=0
virtual ~BlockTemplate()=default
virtual CTransactionRef getCoinbaseTx()=0
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block te...
virtual ~Mining()=default
virtual bool isInitialBlockDownload()=0
Returns whether IBD is still in progress.
virtual std::unique_ptr< BlockTemplate > createNewBlock(const node::BlockCreateOptions &options={})=0
Construct a new block template.
virtual std::optional< BlockRef > getTip()=0
Returns the hash and height for the tip of this chain.
virtual bool isTestChain()=0
If this chain is exclusively used for testing.
virtual node::NodeContext * context()
Get internal node context.
virtual BlockRef waitTipChanged(uint256 current_tip, MillisecondsDouble timeout=MillisecondsDouble::max())=0
Waits for the connected tip to change.
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,...
std::shared_ptr< const CTransaction > CTransactionRef
Hash/height pair to help track and identify blocks.
NodeContext struct containing references to chain state and connection state.
std::chrono::duration< double, std::chrono::milliseconds::period > MillisecondsDouble