Bitcoin Core 32.99.0
P2P Digital Currency
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
10class AddrMan;
11class ArgsManager;
12class CBlockIndex;
14class CConnman;
15class CTxMemPool;
17class PeerManager;
18class BanMan;
19namespace Consensus {
20struct Params;
21} // namespace Consensus
22
23namespace node {
24struct NodeContext;
25} // namespace node
26namespace interfaces {
27class Mining;
28} // namespace interfaces
29
30node::NodeContext& EnsureAnyNodeContext(const std::any& context);
32CTxMemPool& EnsureAnyMemPool(const std::any& context);
34BanMan& EnsureAnyBanman(const std::any& context);
36ArgsManager& EnsureAnyArgsman(const std::any& context);
38ChainstateManager& EnsureAnyChainman(const std::any& context);
45AddrMan& EnsureAnyAddrman(const std::any& context);
46
48void NextEmptyBlockIndex(CBlockIndex& tip, const Consensus::Params& consensusParams, CBlockIndex& next_index);
49
50#endif // BITCOIN_RPC_SERVER_UTIL_H
const CChainParams & Params()
Return the currently selected parameters.
Stochastic address manager.
Definition: addrman.h:110
Definition: banman.h:64
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:94
Definition: net.h:1085
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:950
Manages fee rate estimators.
Definition: estimator_man.h:31
Interface giving clients (RPC, Stratum v2 Template Provider in the future) ability to create block te...
Definition: mining.h:108
Transaction validation functions.
Definition: messages.h:21
BanMan & EnsureBanman(const node::NodeContext &node)
Definition: server_util.cpp:51
FeeRateEstimatorManager & EnsureFeeEstimatorMan(const node::NodeContext &node)
Definition: server_util.cpp:90
ChainstateManager & EnsureAnyChainman(const std::any &context)
Definition: server_util.cpp:85
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)
Definition: server_util.cpp:64
node::NodeContext & EnsureAnyNodeContext(const std::any &context)
Definition: server_util.cpp:28
BanMan & EnsureAnyBanman(const std::any &context)
Definition: server_util.cpp:59
CTxMemPool & EnsureMemPool(const node::NodeContext &node)
Definition: server_util.cpp:37
CTxMemPool & EnsureAnyMemPool(const std::any &context)
Definition: server_util.cpp:45
PeerManager & EnsurePeerman(const node::NodeContext &node)
FeeRateEstimatorManager & EnsureAnyFeeEstimatorMan(const std::any &context)
Definition: server_util.cpp:98
CConnman & EnsureConnman(const node::NodeContext &node)
ChainstateManager & EnsureChainman(const node::NodeContext &node)
Definition: server_util.cpp:77
ArgsManager & EnsureAnyArgsman(const std::any &context)
Definition: server_util.cpp:72
Parameters that influence chain consensus.
Definition: params.h:88
NodeContext struct containing references to chain state and connection state.
Definition: context.h:59