aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.h
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-12-01 00:36:36 +0100
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-03-29 23:29:42 +0200
commit8dbb87a3932f81e23ba7afd865b9aeeb535f0c20 (patch)
tree2b1376e9bb8f6792946c6fabdffdc6a5a73fd8d2 /src/rpc/blockchain.h
parent95cccf8a4b392959c1fd7ec0647e04eb13880865 (diff)
refactor: replace util::Ref by std::any (C++17)
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r--src/rpc/blockchain.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h
index e719dfc702..cd04c9a10f 100644
--- a/src/rpc/blockchain.h
+++ b/src/rpc/blockchain.h
@@ -10,6 +10,7 @@
#include <streams.h>
#include <sync.h>
+#include <any>
#include <stdint.h>
#include <vector>
@@ -23,9 +24,6 @@ class CTxMemPool;
class ChainstateManager;
class UniValue;
struct NodeContext;
-namespace util {
-class Ref;
-} // namespace util
static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5;
@@ -58,10 +56,10 @@ void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES],
void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry, bool include_hex = true, int serialize_flags = 0, const CTxUndo* txundo = nullptr);
-NodeContext& EnsureNodeContext(const util::Ref& context);
-CTxMemPool& EnsureMemPool(const util::Ref& context);
-ChainstateManager& EnsureChainman(const util::Ref& context);
-CBlockPolicyEstimator& EnsureFeeEstimator(const util::Ref& context);
+NodeContext& EnsureNodeContext(const std::any& context);
+CTxMemPool& EnsureMemPool(const std::any& context);
+ChainstateManager& EnsureChainman(const std::any& context);
+CBlockPolicyEstimator& EnsureFeeEstimator(const std::any& context);
/**
* Helper to create UTXO snapshots given a chainstate and a file handle.