Skip to content

Commit

Permalink
missed cleanup of ActivePrecompiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mralj committed Oct 7, 2024
1 parent d409ef8 commit ee58cfe
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions core/vm/contracts.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,26 +200,20 @@ func ActivePrecompiledContracts(rules params.Rules) PrecompiledContracts {

// ActivePrecompiles returns the precompile addresses enabled with the current configuration.
func ActivePrecompiles(rules params.Rules) []common.Address {
var activePrecompileAddresses []common.Address
switch {
case rules.IsPrague:
activePrecompileAddresses = PrecompiledAddressesPrague
return PrecompiledAddressesPrague
case rules.IsCancun:
activePrecompileAddresses = PrecompiledAddressesCancun
return PrecompiledAddressesCancun
case rules.IsBerlin:
activePrecompileAddresses = PrecompiledAddressesBerlin
return PrecompiledAddressesBerlin
case rules.IsIstanbul:
activePrecompileAddresses = PrecompiledAddressesIstanbul
return PrecompiledAddressesIstanbul
case rules.IsByzantium:
activePrecompileAddresses = PrecompiledAddressesByzantium
return PrecompiledAddressesByzantium
default:
activePrecompileAddresses = PrecompiledAddressesHomestead
return PrecompiledAddressesHomestead
}

// [rollup-geth]
activePrecompileAddresses = append(activePrecompileAddresses, slices.Collect(maps.Keys(activeRollupPrecompiledContracts(rules)))...)

return activePrecompileAddresses
}

// RunPrecompiledContract runs and evaluates the output of a precompiled contract.
Expand Down

0 comments on commit ee58cfe

Please sign in to comment.