diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-18 09:46:01 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-27 10:32:24 +0200 |
commit | fa81c30c6f1adac79517c958090db174eb6aeda2 (patch) | |
tree | a83760d0de2e77e6e4ad28877bc3a1616b52461e /src/validation.h | |
parent | 19a56d1519fb493c3e1bd5cad55360b6b80fa52b (diff) |
refactor: Move pruning/reindex/importing globals to blockstorage
Can be reviewed with --color-moved=dimmed-zebra
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/validation.h b/src/validation.h index 9ae2838ead..bd5a0b46e5 100644 --- a/src/validation.h +++ b/src/validation.h @@ -112,8 +112,6 @@ typedef std::unordered_map<uint256, CBlockIndex*, BlockHasher> BlockMap; extern Mutex g_best_block_mutex; extern std::condition_variable g_best_block_cv; extern uint256 g_best_block; -extern std::atomic_bool fImporting; -extern std::atomic_bool fReindex; /** Whether there are dedicated script-checking threads running. * False indicates all script checking is done on the main threadMessageHandler thread. */ @@ -135,13 +133,6 @@ extern arith_uint256 nMinimumChainWork; /** Best header we've seen so far (used for getheaders queries' starting points). */ extern CBlockIndex *pindexBestHeader; -/** Pruning-related variables and constants */ -/** True if any block files have ever been pruned. */ -extern bool fHavePruned; -/** True if we're running in -prune mode. */ -extern bool fPruneMode; -/** Number of MiB of block files that we're trying to stay below. */ -extern uint64_t nPruneTarget; /** Documentation for argument 'checklevel'. */ extern const std::vector<std::string> CHECKLEVEL_DOC; @@ -1012,12 +1003,6 @@ bool DumpMempool(const CTxMemPool& pool, FopenFn mockable_fopen_function = fsbri /** Load the mempool from disk. */ bool LoadMempool(CTxMemPool& pool, CChainState& active_chainstate, FopenFn mockable_fopen_function = fsbridge::fopen); -//! Check whether the block associated with this index entry is pruned or not. -inline bool IsBlockPruned(const CBlockIndex* pblockindex) -{ - return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); -} - /** * Return the expected assumeutxo value for a given height, if one exists. * |