fix(tracing): fix error handling in fillBlockTrace (#890) (#898)

* fix(tracing): fix error handling in `fillBlockTrace`

* chore: auto version bump [bot]

* chore: auto version bump [bot]

---------

Co-authored-by: HAOYUatHZ <HAOYUatHZ@users.noreply.github.com>
This commit is contained in:
HAOYUatHZ 2024-07-12 11:37:21 +08:00 committed by GitHub
parent 1c9cc6d621
commit a84baf6bc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -539,7 +539,7 @@ func (env *TraceEnv) fillBlockTrace(block *types.Block) (*types.BlockTrace, erro
if _, existed := env.StorageProofs[addr.String()][slot.String()]; !existed { if _, existed := env.StorageProofs[addr.String()][slot.String()]; !existed {
if trie, err := statedb.GetStorageTrieForProof(addr); err != nil { if trie, err := statedb.GetStorageTrieForProof(addr); err != nil {
log.Error("Storage proof for intrinstic address not available", "error", err, "address", addr) log.Error("Storage proof for intrinstic address not available", "error", err, "address", addr)
} else if proof, _ := statedb.GetSecureTrieProof(trie, slot); err != nil { } else if proof, err := statedb.GetSecureTrieProof(trie, slot); err != nil {
log.Error("Get storage proof for intrinstic address failed", "error", err, "address", addr, "slot", slot) log.Error("Get storage proof for intrinstic address failed", "error", err, "address", addr, "slot", slot)
} else { } else {
env.StorageProofs[addr.String()][slot.String()] = types.WrapProof(proof) env.StorageProofs[addr.String()][slot.String()] = types.WrapProof(proof)