diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2024-06-07 13:05:06 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2024-06-07 19:18:46 +0200 |
commit | f68cba29b3be0dec7877022b18a193a3b78c1099 (patch) | |
tree | 8ee3af2a1a219b8434a48ad63f6cce9a9ae69364 /src/init.cpp | |
parent | 1b1c6dcca0cc891bd35d29b61628c39098cd94ce (diff) | |
download | bitcoin-f68cba29b3be0dec7877022b18a193a3b78c1099.tar.xz |
blockman: Replace m_reindexing with m_blockfiles_indexed
This is a just a mechanical change, renaming and inverting the meaning
of the indexing variable.
"m_blockfiles_indexed" is a more straightforward name for this variable
because this variable just indicates whether or not
<datadir>/blocks/blk?????.dat files have been indexed in the
<datadir>/blocks/index LevelDB database. The name "m_reindexing" was
more confusing, it could be true even if -reindex was not specified, and
false when it was specified. Also, the previous name unnecessarily
required thinking about the whole reindexing process just to understand
simple checks in validation code about whether blocks were indexed.
The motivation for this change is to follow up on previous commits,
moving away from having multiple variables called "reindex" internally,
and instead naming variables individually after what they do and
represent.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index ec306e4eb9..253c8b7582 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1670,7 +1670,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) // if pruning, perform the initial blockstore prune // after any wallet rescanning has taken place. if (chainman.m_blockman.IsPruneMode()) { - if (!chainman.m_blockman.m_reindexing) { + if (chainman.m_blockman.m_blockfiles_indexed) { LOCK(cs_main); for (Chainstate* chainstate : chainman.GetAll()) { uiInterface.InitMessage(_("Pruning blockstoreā¦").translated); |