diff options
author | Carl Dong <contact@carldong.me> | 2022-03-18 12:35:52 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-04-19 14:36:18 -0400 |
commit | f0a2fb3c5dbf3c4bec7faf934baff3e723734b3f (patch) | |
tree | f9ca702d34d9736f804eb3fc5a1a75208640d260 /src/node/blockstorage.cpp | |
parent | a4014021258319941716d6338c18667462a06280 (diff) |
scripted-diff: Rename pindexBestHeader, fHavePruned
...to m_best_header and m_have_pruned
-BEGIN VERIFY SCRIPT-
find_regex="\bpindexBestHeader\b" \
&& git grep -l -E "$find_regex" -- src \
| xargs sed -i -E "s@$find_regex@m_best_header@g"
find_regex="\bfHavePruned\b" \
&& git grep -l -E "$find_regex" -- src \
| xargs sed -i -E "s@$find_regex@m_have_pruned@g"
-END VERIFY SCRIPT-
Diffstat (limited to 'src/node/blockstorage.cpp')
-rw-r--r-- | src/node/blockstorage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index f3a1afd9fa..21cb0250d8 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -301,7 +301,7 @@ void BlockManager::Unload() m_dirty_blockindex.clear(); m_dirty_fileinfo.clear(); - fHavePruned = false; + m_have_pruned = false; } bool BlockManager::WriteBlockIndexDB() @@ -364,8 +364,8 @@ bool BlockManager::LoadBlockIndexDB() } // Check whether we have ever pruned block & undo files - m_block_tree_db->ReadFlag("prunedblockfiles", fHavePruned); - if (fHavePruned) { + m_block_tree_db->ReadFlag("prunedblockfiles", m_have_pruned); + if (m_have_pruned) { LogPrintf("LoadBlockIndexDB(): Block files have previously been pruned\n"); } @@ -394,7 +394,7 @@ const CBlockIndex* BlockManager::GetLastCheckpoint(const CCheckpointData& data) bool BlockManager::IsBlockPruned(const CBlockIndex* pblockindex) { AssertLockHeld(::cs_main); - return (fHavePruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); + return (m_have_pruned && !(pblockindex->nStatus & BLOCK_HAVE_DATA) && pblockindex->nTx > 0); } // If we're using -prune with -reindex, then delete block files that will be ignored by the |