Revert "internal/ethapi: no need to check zero hash"

This reverts commit 8d4f78c540.

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-11-07 08:33:49 +08:00
parent 38664ef460
commit 57125f0566

View file

@ -689,7 +689,13 @@ func (s *BlockChainAPI) GetProof(ctx context.Context, address common.Address, st
return nil, err
}
codeHash := statedb.GetCodeHash(address)
if codeHash == (common.Hash{}) {
codeHash = types.EmptyCodeHash
}
storageRoot := statedb.GetStorageRoot(address)
if storageRoot == (common.Hash{}) {
storageRoot = types.EmptyRootHash
}
if len(keys) > 0 {
var storageTrie state.Trie