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;
Stochastic address manager.
The block chain is a tree shaped structure starting with the genesis block at the root,...
CBlockIndex * pprev
pointer to the index of the predecessor of this block
uint256 GetBlockHash() const
int nHeight
height of the entry in the chain. The genesis block has height 0
The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included i...
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Provides an interface for creating and interacting with one or two chainstates: an IBD chainstate gen...
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block te...
int64_t UpdateTime(CBlockHeader *pblock, const Consensus::Params &consensusParams, const CBlockIndex *pindexPrev)
unsigned int GetNextWorkRequired(const CBlockIndex *pindexLast, const CBlockHeader *pblock, const Consensus::Params ¶ms)
UniValue JSONRPCError(int code, const std::string &message)
@ RPC_CLIENT_MEMPOOL_DISABLED
Chain errors.
@ RPC_DATABASE_ERROR
Database error.
@ RPC_CLIENT_P2P_DISABLED
No valid connection manager instance found.
ChainstateManager & EnsureAnyChainman(const std::any &context)
BanMan & EnsureBanman(const NodeContext &node)
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.
AddrMan & EnsureAnyAddrman(const std::any &context)
CBlockPolicyEstimator & EnsureFeeEstimator(const NodeContext &node)
NodeContext & EnsureAnyNodeContext(const std::any &context)
CTxMemPool & EnsureMemPool(const NodeContext &node)
BanMan & EnsureAnyBanman(const std::any &context)
PeerManager & EnsurePeerman(const NodeContext &node)
ChainstateManager & EnsureChainman(const NodeContext &node)
CTxMemPool & EnsureAnyMemPool(const std::any &context)
CBlockPolicyEstimator & EnsureAnyFeeEstimator(const std::any &context)
ArgsManager & EnsureArgsman(const NodeContext &node)
interfaces::Mining & EnsureMining(const NodeContext &node)
AddrMan & EnsureAddrman(const NodeContext &node)
CConnman & EnsureConnman(const NodeContext &node)
ArgsManager & EnsureAnyArgsman(const std::any &context)
Parameters that influence chain consensus.
NodeContext struct containing references to chain state and connection state.