mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
Update history_index_iterator.go
This commit is contained in:
parent
cb97c48cb6
commit
a49c3904a5
1 changed files with 4 additions and 0 deletions
|
|
@ -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]:])
|
||||
|
|
|
|||
Loading…
Reference in a new issue