16 #include <txmempool.h> 18 #include <validation.h> 27 auto node_context = util::AnyPtr<NodeContext>(context);
79 return *
node.chainman;
89 if (!
node.fee_estimator) {
92 return *
node.fee_estimator;
105 return *
node.connman;
121 return *
node.peerman;
129 return *
node.addrman;
141 UpdateTime(&next_header, consensusParams, &tip);
143 next_header.nNonce = 0;
145 next_index.
pprev = &tip;
146 next_index.
nTime = next_header.nTime;
147 next_index.
nBits = next_header.nBits;
148 next_index.
nNonce = next_header.nNonce;
CBlockIndex * pprev
pointer to the index of the predecessor of this block
CTxMemPool & EnsureMemPool(const NodeContext &node)
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
void NextEmptyBlockIndex(CBlockIndex &tip, const Consensus::Params &consensusParams, CBlockIndex &next_index)
Return an empty block index on top of the tip, with height, time and nBits set.
int64_t UpdateTime(CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
AddrMan & EnsureAnyAddrman(const std::any &context)
Stochastic address manager.
uint256 GetBlockHash() const
NodeContext struct containing references to chain state and connection state.
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block te...
UniValue JSONRPCError(int code, const std::string &message)
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
unsigned int GetNextWorkRequired(const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params ¶ms)
CBlockPolicyEstimator & EnsureAnyFeeEstimator(const std::any &context)
CBlockPolicyEstimator & EnsureFeeEstimator(const NodeContext &node)
interfaces::Mining & EnsureMining(const NodeContext &node)
CTxMemPool & EnsureAnyMemPool(const std::any &context)
AddrMan & EnsureAddrman(const NodeContext &node)
Parameters that influence chain consensus.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
The block chain is a tree shaped structure starting with the genesis block at the root...
ChainstateManager & EnsureChainman(const NodeContext &node)
BanMan & EnsureAnyBanman(const std::any &context)
ArgsManager & EnsureAnyArgsman(const std::any &context)
PeerManager & EnsurePeerman(const NodeContext &node)
No valid connection manager instance found.
int nHeight
height of the entry in the chain. The genesis block has height 0
ChainstateManager & EnsureAnyChainman(const std::any &context)
NodeContext & EnsureAnyNodeContext(const std::any &context)
ArgsManager & EnsureArgsman(const NodeContext &node)
CConnman & EnsureConnman(const NodeContext &node)
BanMan & EnsureBanman(const NodeContext &node)