aboutsummaryrefslogtreecommitdiff
path: root/src/node/blockstorage.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-12-24 20:06:34 -0500
committerCarl Dong <contact@carldong.me>2022-04-19 14:34:56 -0400
commit3308ecd3fc254ee4ef9f803c09f00ba4dc968520 (patch)
tree20898e5727d2c23d45ef6f786225b5291f201c28 /src/node/blockstorage.h
parentc96524113c48553c4bbad63077a25494eca8159e (diff)
downloadbitcoin-3308ecd3fc254ee4ef9f803c09f00ba4dc968520.tar.xz
move-mostly: Make fHavePruned a BlockMan member
[META] In the next commit, we move the clearing of fHavePruned to BlockManager::Unload()
Diffstat (limited to 'src/node/blockstorage.h')
-rw-r--r--src/node/blockstorage.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/node/blockstorage.h b/src/node/blockstorage.h
index 3a95e321f7..332dc2e28a 100644
--- a/src/node/blockstorage.h
+++ b/src/node/blockstorage.h
@@ -45,8 +45,6 @@ static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
extern std::atomic_bool fImporting;
extern std::atomic_bool fReindex;
/** 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. */
@@ -171,15 +169,18 @@ public:
//! Returns last CBlockIndex* that is a checkpoint
const CBlockIndex* GetLastCheckpoint(const CCheckpointData& data) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ /** True if any block files have ever been pruned. */
+ bool fHavePruned = false;
+
+ //! Check whether the block associated with this index entry is pruned or not.
+ bool IsBlockPruned(const CBlockIndex* pblockindex) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
+
~BlockManager()
{
Unload();
}
};
-//! Check whether the block associated with this index entry is pruned or not.
-bool IsBlockPruned(const CBlockIndex* pblockindex) EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
-
void CleanupBlockRevFiles();
/** Open a block file (blk?????.dat) */