Skip to content

Commit 19fa71b

Browse files
authored
internal/ethapi: remove double map-clone (#30803)
Similar to #30788
1 parent 02159d5 commit 19fa71b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/ethapi/simulate.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"encoding/json"
2222
"errors"
2323
"fmt"
24-
"maps"
2524
"math/big"
2625
"time"
2726

@@ -186,7 +185,7 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
186185
Tracer: tracer.Hooks(),
187186
}
188187
)
189-
var tracingStateDB = vm.StateDB(sim.state)
188+
tracingStateDB := vm.StateDB(sim.state)
190189
if hooks := tracer.Hooks(); hooks != nil {
191190
tracingStateDB = state.NewHookedState(sim.state, hooks)
192191
}
@@ -289,7 +288,7 @@ func (sim *simulator) activePrecompiles(base *types.Header) vm.PrecompiledContra
289288
isMerge = (base.Difficulty.Sign() == 0)
290289
rules = sim.chainConfig.Rules(base.Number, isMerge, base.Time)
291290
)
292-
return maps.Clone(vm.ActivePrecompiledContracts(rules))
291+
return vm.ActivePrecompiledContracts(rules)
293292
}
294293

295294
// sanitizeChain checks the chain integrity. Specifically it checks that

0 commit comments

Comments
 (0)