Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
server_util.h
Go to the documentation of this file.
1// Copyright (c) 2021-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_RPC_SERVER_UTIL_H
6#define BITCOIN_RPC_SERVER_UTIL_H
7
8#include <any>
9
10#include <consensus/params.h>
11
12class AddrMan;
13class ArgsManager;
14class CBlockIndex;
16class CConnman;
17class CTxMemPool;
19class PeerManager;
20class BanMan;
21namespace node {
22struct NodeContext;
23} // namespace node
24namespace interfaces {
25class Mining;
26} // namespace interfaces
27
30CTxMemPool& EnsureAnyMemPool(const std::any& context);
32BanMan& EnsureAnyBanman(const std::any& context);
34ArgsManager& EnsureAnyArgsman(const std::any& context);
43AddrMan& EnsureAnyAddrman(const std::any& context);
44
46void NextEmptyBlockIndex(CBlockIndex& tip, const Consensus::Params& consensusParams, CBlockIndex& next_index);
47
48#endif // BITCOIN_RPC_SERVER_UTIL_H
Stochastic address manager.
Definition addrman.h:89
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition chain.h:94
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 ...
Definition txmempool.h:187
Interface for managing multiple Chainstate objects, where each chainstate is associated with chainsta...
Definition validation.h:940
virtual node::NodeContext * context()
Definition mining.h:159
BanMan & EnsureBanman(const node::NodeContext &node)
ChainstateManager & EnsureAnyChainman(const std::any &context)
interfaces::Mining & EnsureMining(const node::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)
AddrMan & EnsureAddrman(const node::NodeContext &node)
ArgsManager & EnsureArgsman(const node::NodeContext &node)
CBlockPolicyEstimator & EnsureFeeEstimator(const node::NodeContext &node)
node::NodeContext & EnsureAnyNodeContext(const std::any &context)
BanMan & EnsureAnyBanman(const std::any &context)
CTxMemPool & EnsureMemPool(const node::NodeContext &node)
CTxMemPool & EnsureAnyMemPool(const std::any &context)
PeerManager & EnsurePeerman(const node::NodeContext &node)
CBlockPolicyEstimator & EnsureAnyFeeEstimator(const std::any &context)
CConnman & EnsureConnman(const node::NodeContext &node)
ChainstateManager & EnsureChainman(const node::NodeContext &node)
ArgsManager & EnsureAnyArgsman(const std::any &context)
Parameters that influence chain consensus.
Definition params.h:84