remove td calc in eth_simulate

pull/30386/head
Sina Mahmoodi 2 months ago
parent 83e4e6a88d
commit a97d44b86f
  1. 3
      internal/ethapi/simulate.go

@ -125,8 +125,6 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]map[str
var (
results = make([]map[string]interface{}, len(blocks))
parent = sim.base
// Assume same total difficulty for all simulated blocks.
td = sim.b.GetTd(ctx, sim.base.Hash())
)
for bi, block := range blocks {
result, callResults, err := sim.processBlock(ctx, &block, headers[bi], parent, headers[:bi], timeout)
@ -134,7 +132,6 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]map[str
return nil, err
}
enc := RPCMarshalBlock(result, true, sim.fullTx, sim.chainConfig)
enc["totalDifficulty"] = (*hexutil.Big)(td)
enc["calls"] = callResults
results[bi] = enc

Loading…
Cancel
Save