Update history_index_iterator.go

This commit is contained in:
splinter 2026-01-31 16:36:58 +01:00 committed by GitHub
parent cb97c48cb6
commit a49c3904a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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]:])