30 auto node_context = util::AnyPtr<NodeContext>(
context);
82 return *
node.chainman;
92 if (!
node.fee_estimator_man) {
95 return *
node.fee_estimator_man;
108 return *
node.connman;
113 if (!
node.block_template_manager) {
116 return *
node.block_template_manager;
124 return *
node.peerman;
132 return *
node.addrman;
144 UpdateTime(&next_header, consensusParams, &tip);
146 next_header.nNonce = 0;
148 next_index.
pprev = &tip;
149 next_index.
nTime = next_header.nTime;
150 next_index.
nBits = next_header.nBits;
151 next_index.
nNonce = next_header.nNonce;
const CChainParams & Params()
Return the currently selected parameters.
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
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Interface for managing multiple Chainstate objects, where each chainstate is associated with chainsta...
Manages fee rate estimators.
Creates block templates, submits solved blocks, and provides tip-waiting helpers for mining code.
Transaction validation functions.
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)
FeeRateEstimatorManager & EnsureFeeEstimatorMan(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)
node::BlockTemplateManager & EnsureBlockTemplateManager(const NodeContext &node)
CTxMemPool & EnsureAnyMemPool(const std::any &context)
FeeRateEstimatorManager & EnsureAnyFeeEstimatorMan(const std::any &context)
ArgsManager & EnsureArgsman(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.