Skip to content

Commit

Permalink
check for nil account in get_proof (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov authored Sep 25, 2024
1 parent 9b226c7 commit 8381066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
3 changes: 3 additions & 0 deletions cmd/rpcdaemon/commands/eth_call.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ func (api *APIImpl) GetProof(ctx context.Context, address libcommon.Address, sto
if err != nil {
return nil, err
}
if a == nil {
return nil, nil
}
pr, err := trie.NewProofRetainer(address, a, storageKeys, rl)
if err != nil {
return nil, err
Expand Down
15 changes: 0 additions & 15 deletions turbo/trie/trie_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,6 @@ func (r *RootHashAggregator) Receive(itemType StreamItem,
hasTree bool,
cutoff int,
) error {
//r.traceIf("9c3dc2561d472d125d8f87dde8f2e3758386463ade768ae1a1546d34101968bb", "00")
//if storageKey == nil {
// //if bytes.HasPrefix(accountKey, common.FromHex("08050d07")) {
// fmt.Printf("1: %d, %x, %x\n", itemType, accountKey, hash)
// //}
//} else {
// //if bytes.HasPrefix(accountKey, common.FromHex("876f5a0f54b30254d2bad26bb5a8da19cbe748fd033004095d9c96c8e667376b")) && bytes.HasPrefix(storageKey, common.FromHex("")) {
// //fmt.Printf("%x\n", storageKey)
// fmt.Printf("1: %d, %x, %x, %x\n", itemType, accountKey, storageKey, hash)
// //}
//}
//

fmt.Printf("1: %d, %x, %x, %x\n", itemType, accountKey, storageKey, hash)

switch itemType {
case StorageStreamItem:
if len(r.currAccK) == 0 {
Expand Down

0 comments on commit 8381066

Please sign in to comment.