aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r--src/rpc/blockchain.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h
index d8cae4dd24..ffb6f03b47 100644
--- a/src/rpc/blockchain.h
+++ b/src/rpc/blockchain.h
@@ -6,9 +6,11 @@
#define BITCOIN_RPC_BLOCKCHAIN_H
#include <amount.h>
+#include <core_io.h>
#include <streams.h>
#include <sync.h>
+#include <any>
#include <stdint.h>
#include <vector>
@@ -22,9 +24,6 @@ class CTxMemPool;
class ChainstateManager;
class UniValue;
struct NodeContext;
-namespace util {
-class Ref;
-} // namespace util
static constexpr int NUM_GETBLOCKSTATS_PERCENTILES = 5;
@@ -54,10 +53,16 @@ UniValue blockheaderToJSON(const CBlockIndex* tip, const CBlockIndex* blockindex
/** Used by getblockstats to get feerates at different percentiles by weight */
void CalculatePercentilesByWeight(CAmount result[NUM_GETBLOCKSTATS_PERCENTILES], std::vector<std::pair<CAmount, int64_t>>& scores, int64_t total_weight);
-NodeContext& EnsureNodeContext(const util::Ref& context);
-CTxMemPool& EnsureMemPool(const util::Ref& context);
-ChainstateManager& EnsureChainman(const util::Ref& context);
-CBlockPolicyEstimator& EnsureFeeEstimator(const util::Ref& context);
+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& 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);
/**
* Helper to create UTXO snapshots given a chainstate and a file handle.