From a49c3904a52f07240e28557b01a11ef0df940622 Mon Sep 17 00:00:00 2001 From: splinter Date: Sat, 31 Jan 2026 16:36:58 +0100 Subject: [PATCH] Update history_index_iterator.go --- triedb/pathdb/history_index_iterator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/triedb/pathdb/history_index_iterator.go b/triedb/pathdb/history_index_iterator.go index e4aca24f5d..0208960b01 100644 --- a/triedb/pathdb/history_index_iterator.go +++ b/triedb/pathdb/history_index_iterator.go @@ -217,6 +217,10 @@ func (it *blockIterator) seekGT(id uint64) bool { if it.err != nil { return false } + if len(it.data) == 0 || len(it.restarts) == 0 { + it.exhausted = true + return false + } var err error index := sort.Search(len(it.restarts), func(i int) bool { item, n := binary.Uvarint(it.data[it.restarts[i]:])