mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
core/state/snapshot: check it.fail error
This commit is contained in:
parent
1b0705e2f5
commit
cebc3312f3
1 changed files with 7 additions and 3 deletions
|
|
@ -121,11 +121,15 @@ func (it *binaryIterator) Next() bool {
|
|||
if !it.next() {
|
||||
return false
|
||||
}
|
||||
if len(it.Account()) == 0 && len(it.Slot()) == 0 {
|
||||
continue
|
||||
}
|
||||
if len(it.Account()) != 0 || len(it.Slot()) != 0 {
|
||||
return true
|
||||
}
|
||||
// it.fail might be set if error occurs by calling
|
||||
// it.Account() or it.Slot(), stop iteration if so.
|
||||
if it.fail != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (it *binaryIterator) next() bool {
|
||||
|
|
|
|||
Loading…
Reference in a new issue