mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Update iterator.go
This commit is contained in:
parent
2a60aa7841
commit
9d75b7e6be
1 changed files with 2 additions and 2 deletions
|
|
@ -89,7 +89,7 @@ func (dl *diffLayer) AccountIterator(seek common.Hash) AccountIterator {
|
||||||
index := sort.Search(len(hashes), func(i int) bool {
|
index := sort.Search(len(hashes), func(i int) bool {
|
||||||
return bytes.Compare(seek[:], hashes[i][:]) <= 0
|
return bytes.Compare(seek[:], hashes[i][:]) <= 0
|
||||||
})
|
})
|
||||||
// Assemble and returned the already sought iterator
|
// Assemble and returned the already seeked iterator
|
||||||
return &diffAccountIterator{
|
return &diffAccountIterator{
|
||||||
layer: dl,
|
layer: dl,
|
||||||
keys: hashes[index:],
|
keys: hashes[index:],
|
||||||
|
|
@ -255,7 +255,7 @@ func (dl *diffLayer) StorageIterator(account common.Hash, seek common.Hash) (Sto
|
||||||
index := sort.Search(len(hashes), func(i int) bool {
|
index := sort.Search(len(hashes), func(i int) bool {
|
||||||
return bytes.Compare(seek[:], hashes[i][:]) <= 0
|
return bytes.Compare(seek[:], hashes[i][:]) <= 0
|
||||||
})
|
})
|
||||||
// Assemble and returned the already sought iterator
|
// Assemble and returned the already seeked iterator
|
||||||
return &diffStorageIterator{
|
return &diffStorageIterator{
|
||||||
layer: dl,
|
layer: dl,
|
||||||
account: account,
|
account: account,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue