diff options
author | James O'Beirne <james.obeirne@pm.me> | 2020-08-25 13:46:58 -0400 |
---|---|---|
committer | James O'Beirne <james.obeirne@pm.me> | 2021-02-12 07:53:34 -0600 |
commit | 6606a4f8c616cf256537c3bfbdade9b43c51b4f5 (patch) | |
tree | 910c48b11b571dba80c11a5a9dbaa4d4226c3328 /src/rpc/blockchain.h | |
parent | ad949ba449ff2115e3d22c71f5b6509f11112098 (diff) | |
download | bitcoin-6606a4f8c616cf256537c3bfbdade9b43c51b4f5.tar.xz |
move-onlyish: break out CreateUTXOSnapshot from dumptxoutset
This move/refactor is needed to set up a decent unittest for UTXO snapshot activation.
Diffstat (limited to 'src/rpc/blockchain.h')
-rw-r--r-- | src/rpc/blockchain.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rpc/blockchain.h b/src/rpc/blockchain.h index e4ce80400e..d8cae4dd24 100644 --- a/src/rpc/blockchain.h +++ b/src/rpc/blockchain.h @@ -6,6 +6,7 @@ #define BITCOIN_RPC_BLOCKCHAIN_H #include <amount.h> +#include <streams.h> #include <sync.h> #include <stdint.h> @@ -16,6 +17,7 @@ extern RecursiveMutex cs_main; class CBlock; class CBlockIndex; class CBlockPolicyEstimator; +class CChainState; class CTxMemPool; class ChainstateManager; class UniValue; @@ -57,4 +59,10 @@ CTxMemPool& EnsureMemPool(const util::Ref& context); ChainstateManager& EnsureChainman(const util::Ref& context); CBlockPolicyEstimator& EnsureFeeEstimator(const util::Ref& context); +/** + * Helper to create UTXO snapshots given a chainstate and a file handle. + * @return a UniValue map containing metadata about the snapshot. + */ +UniValue CreateUTXOSnapshot(NodeContext& node, CChainState& chainstate, CAutoFile& afile); + #endif |