diff options
Diffstat (limited to 'src/rpc/server_util.h')
-rw-r--r-- | src/rpc/server_util.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/rpc/server_util.h b/src/rpc/server_util.h new file mode 100644 index 0000000000..ad3c149c90 --- /dev/null +++ b/src/rpc/server_util.h @@ -0,0 +1,27 @@ +// Copyright (c) 2021 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#ifndef BITCOIN_RPC_SERVER_UTIL_H +#define BITCOIN_RPC_SERVER_UTIL_H + +#include <any> + +class CBlockPolicyEstimator; +class CConnman; +class ChainstateManager; +class CTxMemPool; +struct NodeContext; +class PeerManager; + +NodeContext& EnsureAnyNodeContext(const std::any& context); +CTxMemPool& EnsureMemPool(const NodeContext& node); +CTxMemPool& EnsureAnyMemPool(const std::any& context); +ChainstateManager& EnsureChainman(const NodeContext& node); +ChainstateManager& EnsureAnyChainman(const std::any& context); +CBlockPolicyEstimator& EnsureFeeEstimator(const NodeContext& node); +CBlockPolicyEstimator& EnsureAnyFeeEstimator(const std::any& context); +CConnman& EnsureConnman(const NodeContext& node); +PeerManager& EnsurePeerman(const NodeContext& node); + +#endif // BITCOIN_RPC_SERVER_UTIL_H |