File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ class CBlock;
2121class CBlockIndex ;
2222class CChainState ;
2323class CTxMemPool ;
24- class ChainstateManager ;
2524class UniValue ;
2625struct NodeContext ;
2726
Original file line number Diff line number Diff line change @@ -37,6 +37,19 @@ CTxMemPool& EnsureAnyMemPool(const std::any& context)
3737 return EnsureMemPool (EnsureAnyNodeContext (context));
3838}
3939
40+ ArgsManager& EnsureArgsman (const NodeContext& node)
41+ {
42+ if (!node.args ) {
43+ throw JSONRPCError (RPC_INTERNAL_ERROR, " Node args not found" );
44+ }
45+ return *node.args ;
46+ }
47+
48+ ArgsManager& EnsureAnyArgsman (const std::any& context)
49+ {
50+ return EnsureArgsman (EnsureAnyNodeContext (context));
51+ }
52+
4053ChainstateManager& EnsureChainman (const NodeContext& node)
4154{
4255 if (!node.chainman ) {
Original file line number Diff line number Diff line change 77
88#include < any>
99
10+ class ArgsManager ;
1011class CBlockPolicyEstimator ;
1112class CConnman ;
12- class ChainstateManager ;
1313class CTxMemPool ;
14- struct NodeContext ;
14+ class ChainstateManager ;
1515class PeerManager ;
16+ struct NodeContext ;
1617
1718NodeContext& EnsureAnyNodeContext (const std::any& context);
1819CTxMemPool& EnsureMemPool (const NodeContext& node);
1920CTxMemPool& EnsureAnyMemPool (const std::any& context);
21+ ArgsManager& EnsureArgsman (const NodeContext& node);
22+ ArgsManager& EnsureAnyArgsman (const std::any& context);
2023ChainstateManager& EnsureChainman (const NodeContext& node);
2124ChainstateManager& EnsureAnyChainman (const std::any& context);
2225CBlockPolicyEstimator& EnsureFeeEstimator (const NodeContext& node);
You can’t perform that action at this time.
0 commit comments