Skip to content

Commit

Permalink
account range fix for test_11.json (#12734)
Browse files Browse the repository at this point in the history
closes #12608

---------

Co-authored-by: JkLondon <[email protected]>
  • Loading branch information
JkLondon and JkLondon authored Nov 15, 2024
1 parent bb0c46b commit 8ce34cb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/state/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"encoding/json"
"errors"
"fmt"

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/hexutility"
"github.com/erigontech/erigon-lib/crypto"
Expand Down Expand Up @@ -172,13 +171,13 @@ func (d *Dumper) DumpToCollector(c DumpCollector, excludeCode, excludeStorage bo
if err != nil {
return nil, err
}
if len(v) == 0 {
continue
}
if maxResults > 0 && numberOfResults >= maxResults {
nextKey = append(nextKey[:0], k...)
break
}
if len(v) == 0 {
continue
}

if e := accounts.DeserialiseV3(&acc, v); e != nil {
return nil, fmt.Errorf("decoding %x for %x: %w", v, k, e)
Expand All @@ -191,7 +190,7 @@ func (d *Dumper) DumpToCollector(c DumpCollector, excludeCode, excludeStorage bo
Storage: make(map[string]string),
}
if acc.CodeHash != emptyCodeHash {
account.CodeHash = acc.CodeHash[:]
account.CodeHash = hexutility.Bytes(acc.CodeHash.Bytes())

if !excludeCode {
r, _, err := ttx.DomainGet(kv.CodeDomain, k, nil)
Expand All @@ -212,7 +211,6 @@ func (d *Dumper) DumpToCollector(c DumpCollector, excludeCode, excludeStorage bo

for i, addr := range addrList {
account := accountList[i]

if !excludeStorage {
t := trie.New(libcommon.Hash{})
nextAcc, _ := kv.NextSubtree(addr[:])
Expand Down

0 comments on commit 8ce34cb

Please sign in to comment.