Skip to content

Commit

Permalink
refactor(taiko): update Contracts map to use common.Address for impro…
Browse files Browse the repository at this point in the history
…ved type consistency
  • Loading branch information
johntaiko committed Jan 24, 2025
1 parent ac059ae commit 701116d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions eth/tracers/taiko_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ func (api *API) provingPreflights(start, end *types.Block, config *TraceConfig,
break
}
task.preflight.InitAccountProofs = append(task.preflight.InitAccountProofs, proof)
task.preflight.Contracts[addr] = (*hexutil.Bytes)(&code)
if code != nil {
task.preflight.Contracts[addr] = (*hexutil.Bytes)(&code)
}
}
task.preflight.AncestorHashes = touchedHashes

Expand Down Expand Up @@ -313,7 +315,7 @@ func (api *API) provingPreflights(start, end *types.Block, config *TraceConfig,
preflight: &provingPreflightResult{
Block: next,
InitAccountProofs: []*ethapi.AccountResult{},
Contracts: map[common.Hash]*hexutil.Bytes{},
Contracts: map[common.Address]*hexutil.Bytes{},
AncestorHashes: map[uint64]common.Hash{},
},
}:
Expand Down

0 comments on commit 701116d

Please sign in to comment.