diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2021-04-18 23:06:18 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2022-04-25 23:22:00 +0200 |
commit | f08c9fb0c6a799e3cb75ca5f763a746471625beb (patch) | |
tree | cf2cb7bbf15a69cf52bc997ac26305adf3907227 /src/validation.cpp | |
parent | 2561823531c25e1510c107eb41de944b00444ce0 (diff) |
Index: Use prune locks for blockfilterindex
Prior to this change blocks could be pruned up to the last block before the blockfilterindex current best block.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index c0c541a396..3676316f76 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -19,7 +19,6 @@ #include <deploymentstatus.h> #include <flatfile.h> #include <hash.h> -#include <index/blockfilterindex.h> #include <logging.h> #include <logging/timer.h> #include <node/blockstorage.h> @@ -2349,10 +2348,6 @@ bool CChainState::FlushStateToDisk( int last_prune{m_chain.Height()}; // last height we can prune std::optional<std::string> limiting_lock; // prune lock that actually was the limiting factor, only used for logging - ForEachBlockFilterIndex([&](BlockFilterIndex& index) { - last_prune = std::max(1, std::min(last_prune, index.GetSummary().best_block_height)); - }); - for (const auto& prune_lock : m_blockman.m_prune_locks) { if (prune_lock.second.height_first == std::numeric_limits<int>::max()) continue; // Remove the buffer and one additional block here to get actual height that is outside of the buffer |