fix(traces): deletion proof apply wrong storage value from structLogger (#870)

cherry pick 4e3bf2f
This commit is contained in:
HAOYUatHZ 2024-07-01 11:05:50 +08:00 committed by GitHub
parent 86c37a9075
commit 9c7381669e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -420,10 +420,11 @@ func (env *TraceEnv) getTxResult(state *state.StateDB, index int, block *types.B
zktrieTracer := state.NewProofTracer(trie) zktrieTracer := state.NewProofTracer(trie)
env.sMu.Unlock() env.sMu.Unlock()
for key, values := range keys { for key := range keys {
addrStr := addr.String() addrStr := addr.String()
keyStr := key.String() keyStr := key.String()
isDelete := bytes.Equal(values.Bytes(), common.Hash{}.Bytes()) value := state.GetState(addr, key)
isDelete := bytes.Equal(value.Bytes(), common.Hash{}.Bytes())
txm := txStorageTrace.StorageProofs[addrStr] txm := txStorageTrace.StorageProofs[addrStr]
env.sMu.Lock() env.sMu.Lock()