From bf8ed1caa22007e2bd9a0ac41ee47acefb088e08 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 18 Feb 2025 19:02:11 +0100 Subject: [PATCH] review feedback --- internal/ethapi/simulate.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/ethapi/simulate.go b/internal/ethapi/simulate.go index b1a612ff9d..0744afbee0 100644 --- a/internal/ethapi/simulate.go +++ b/internal/ethapi/simulate.go @@ -75,13 +75,14 @@ func (r *simCallResult) MarshalJSON() ([]byte, error) { // simBlockResult is the result of a simulated block. type simBlockResult struct { - sim *simulator - Block *types.Block - Calls []simCallResult + fullTx bool + chainConfig *params.ChainConfig + Block *types.Block + Calls []simCallResult } func (r *simBlockResult) MarshalJSON() ([]byte, error) { - blockData := RPCMarshalBlock(r.Block, true, r.sim.fullTx, r.sim.chainConfig) + blockData := RPCMarshalBlock(r.Block, true, r.fullTx, r.chainConfig) blockData["calls"] = r.Calls return json.Marshal(blockData) } @@ -148,7 +149,7 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]*simBlo if err != nil { return nil, err } - results[bi] = &simBlockResult{sim: sim, Block: result, Calls: callResults} + results[bi] = &simBlockResult{fullTx: sim.fullTx, chainConfig: sim.chainConfig, Block: result, Calls: callResults} parent = result.Header() prevHeaders = append(prevHeaders, parent) }