From ac059aeae0bc8798d82fa4b06e5148c3c22d6b18 Mon Sep 17 00:00:00 2001 From: john xu Date: Fri, 24 Jan 2025 16:30:57 +0800 Subject: [PATCH] refactor(taiko): update provingPreflightResult to use common.Address for contracts --- eth/tracers/taiko_api.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eth/tracers/taiko_api.go b/eth/tracers/taiko_api.go index 1bd4b4b16cc6..f824a9585335 100644 --- a/eth/tracers/taiko_api.go +++ b/eth/tracers/taiko_api.go @@ -26,11 +26,11 @@ type TaikoBackend interface { // provingPreflightResult is the result of a proving preflight request. type provingPreflightResult struct { - Block *types.Block `json:"block"` - InitAccountProofs []*ethapi.AccountResult `json:"initAccountProofs"` - Contracts map[common.Hash]*hexutil.Bytes `json:"contracts"` - AncestorHashes map[uint64]common.Hash `json:"ancestorHashes"` - Error string `json:"error,omitempty"` + Block *types.Block `json:"block"` + InitAccountProofs []*ethapi.AccountResult `json:"initAccountProofs"` + Contracts map[common.Address]*hexutil.Bytes `json:"contracts"` + AncestorHashes map[uint64]common.Hash `json:"ancestorHashes"` + Error string `json:"error,omitempty"` } // provingPreflightTask represents a single block preflight task. @@ -194,7 +194,7 @@ func (api *API) provingPreflights(start, end *types.Block, config *TraceConfig, break } task.preflight.InitAccountProofs = append(task.preflight.InitAccountProofs, proof) - task.preflight.Contracts[proof.CodeHash] = (*hexutil.Bytes)(&code) + task.preflight.Contracts[addr] = (*hexutil.Bytes)(&code) } task.preflight.AncestorHashes = touchedHashes