mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
[API] Remove double map clone
This commit is contained in:
parent
5e1a39d67f
commit
7d4de184af
1 changed files with 2 additions and 3 deletions
|
|
@ -21,7 +21,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"maps"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -186,7 +185,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
|
||||||
Tracer: tracer.Hooks(),
|
Tracer: tracer.Hooks(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
var tracingStateDB = vm.StateDB(sim.state)
|
tracingStateDB := vm.StateDB(sim.state)
|
||||||
if hooks := tracer.Hooks(); hooks != nil {
|
if hooks := tracer.Hooks(); hooks != nil {
|
||||||
tracingStateDB = state.NewHookedState(sim.state, hooks)
|
tracingStateDB = state.NewHookedState(sim.state, hooks)
|
||||||
}
|
}
|
||||||
|
|
@ -289,7 +288,7 @@ func (sim *simulator) activePrecompiles(base *types.Header) vm.PrecompiledContra
|
||||||
isMerge = (base.Difficulty.Sign() == 0)
|
isMerge = (base.Difficulty.Sign() == 0)
|
||||||
rules = sim.chainConfig.Rules(base.Number, isMerge, base.Time)
|
rules = sim.chainConfig.Rules(base.Number, isMerge, base.Time)
|
||||||
)
|
)
|
||||||
return maps.Clone(vm.ActivePrecompiledContracts(rules))
|
return vm.ActivePrecompiledContracts(rules)
|
||||||
}
|
}
|
||||||
|
|
||||||
// sanitizeChain checks the chain integrity. Specifically it checks that
|
// sanitizeChain checks the chain integrity. Specifically it checks that
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue