From b919bf009b66306faf4d9f0f88a1c0689f2a1b0f Mon Sep 17 00:00:00 2001 From: Zsolt Felfoldi Date: Fri, 21 Mar 2025 07:00:17 +0100 Subject: [PATCH] core/filtermaps: fixed tail unindexing condition for epoch 0 --- core/filtermaps/indexer.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/filtermaps/indexer.go b/core/filtermaps/indexer.go index 61a9bf0352..4c31d24910 100644 --- a/core/filtermaps/indexer.go +++ b/core/filtermaps/indexer.go @@ -356,15 +356,17 @@ func (f *FilterMaps) needTailEpoch(epoch uint32) bool { if epoch+1 < firstEpoch { return false } + var lastBlockOfPrevEpoch uint64 if epoch > 0 { - lastBlockOfPrevEpoch, _, err := f.getLastBlockOfMap(epoch<= firstEpoch } - if f.historyCutoff > lastBlockOfPrevEpoch { - return false - } + } + if f.historyCutoff > lastBlockOfPrevEpoch { + return false } lastBlockOfEpoch, _, err := f.getLastBlockOfMap((epoch+1)<