From 0b68bc7efd532e8a122e87bc1d545615c8fcfca9 Mon Sep 17 00:00:00 2001 From: Valentin Staykov Date: Wed, 26 Jun 2024 12:09:11 +0000 Subject: [PATCH] add a small check and remove debug print --- cmd/rpcdaemon/commands/eth_call.go | 3 +++ turbo/trie/trie_root.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/rpcdaemon/commands/eth_call.go b/cmd/rpcdaemon/commands/eth_call.go index bb6e143cb80..c9c5e1760bc 100644 --- a/cmd/rpcdaemon/commands/eth_call.go +++ b/cmd/rpcdaemon/commands/eth_call.go @@ -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 diff --git a/turbo/trie/trie_root.go b/turbo/trie/trie_root.go index 996ef935cb4..187befbc25c 100644 --- a/turbo/trie/trie_root.go +++ b/turbo/trie/trie_root.go @@ -341,8 +341,6 @@ func (r *RootHashAggregator) Receive(itemType StreamItem, //} // - fmt.Printf("1: %d, %x, %x, %x\n", itemType, accountKey, storageKey, hash) - switch itemType { case StorageStreamItem: if len(r.currAccK) == 0 {