aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.h
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-04-17 11:28:45 -0400
committerRussell Yanofsky <russ@yanofsky.org>2020-05-13 16:20:13 -0400
commit6fca33b2edc09ed62dab2323c780b31585de1750 (patch)
tree32b5eb4a502b676b3d71bbb168095b93871311b6 /src/rpc/blockchain.h
parent691c817b340d10e806dc3b1834d2a8fcc5e681fd (diff)
downloadbitcoin-6fca33b2edc09ed62dab2323c780b31585de1750.tar.xz
refactor: Pass NodeContext to RPC and REST methods through util::Ref
This commit does not change behavior
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r--src/rpc/blockchain.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h
index a02e5fae0e..fec9a0d3c5 100644
--- a/src/rpc/blockchain.h
+++ b/src/rpc/blockchain.h
@@ -18,6 +18,9 @@ class CBlockIndex;
class CTxMemPool;
class UniValue;
struct NodeContext;
+namespace util {
+class Ref;
+} // namespace util
static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5;
@@ -52,6 +55,7 @@ void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES],
//! direct way to pass in state to RPC methods without globals.
extern NodeContext* g_rpc_node;
-CTxMemPool& EnsureMemPool();
+NodeContext& EnsureNodeContext(const util::Ref& context);
+CTxMemPool& EnsureMemPool(const util::Ref& context);
#endif