aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorFabian Jahr <fjahr@protonmail.com>2021-04-18 23:06:18 +0200
committerFabian Jahr <fjahr@protonmail.com>2022-04-25 23:22:00 +0200
commitf08c9fb0c6a799e3cb75ca5f763a746471625beb (patch)
treecf2cb7bbf15a69cf52bc997ac26305adf3907227 /src/validation.cpp
parent2561823531c25e1510c107eb41de944b00444ce0 (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.cpp5
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