mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
remove td calc in eth_simulate
This commit is contained in:
parent
83e4e6a88d
commit
a97d44b86f
1 changed files with 0 additions and 3 deletions
|
|
@ -125,8 +125,6 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]map[str
|
||||||
var (
|
var (
|
||||||
results = make([]map[string]interface{}, len(blocks))
|
results = make([]map[string]interface{}, len(blocks))
|
||||||
parent = sim.base
|
parent = sim.base
|
||||||
// Assume same total difficulty for all simulated blocks.
|
|
||||||
td = sim.b.GetTd(ctx, sim.base.Hash())
|
|
||||||
)
|
)
|
||||||
for bi, block := range blocks {
|
for bi, block := range blocks {
|
||||||
result, callResults, err := sim.processBlock(ctx, &block, headers[bi], parent, headers[:bi], timeout)
|
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
|
return nil, err
|
||||||
}
|
}
|
||||||
enc := RPCMarshalBlock(result, true, sim.fullTx, sim.chainConfig)
|
enc := RPCMarshalBlock(result, true, sim.fullTx, sim.chainConfig)
|
||||||
enc["totalDifficulty"] = (*hexutil.Big)(td)
|
|
||||||
enc["calls"] = callResults
|
enc["calls"] = callResults
|
||||||
results[bi] = enc
|
results[bi] = enc
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue