core/vm: remove unused function LookupInstructionSet

This commit is contained in:
Jared Wasinger 2024-11-21 21:08:09 +07:00
parent e3d61e6db0
commit fe52539357

View file

@ -16,46 +16,6 @@
package vm
import (
"errors"
"github.com/ethereum/go-ethereum/params"
)
// LookupInstructionSet returns the instruction set for the fork configured by
// the rules.
func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
switch {
case rules.IsVerkle:
return newCancunInstructionSet(), errors.New("verkle-fork not defined yet")
case rules.IsPrague:
return newCancunInstructionSet(), errors.New("prague-fork not defined yet")
case rules.IsCancun:
return newCancunInstructionSet(), nil
case rules.IsShanghai:
return newShanghaiInstructionSet(), nil
case rules.IsMerge:
return newMergeInstructionSet(), nil
case rules.IsLondon:
return newLondonInstructionSet(), nil
case rules.IsBerlin:
return newBerlinInstructionSet(), nil
case rules.IsIstanbul:
return newIstanbulInstructionSet(), nil
case rules.IsConstantinople:
return newConstantinopleInstructionSet(), nil
case rules.IsByzantium:
return newByzantiumInstructionSet(), nil
case rules.IsEIP158:
return newSpuriousDragonInstructionSet(), nil
case rules.IsEIP150:
return newTangerineWhistleInstructionSet(), nil
case rules.IsHomestead:
return newHomesteadInstructionSet(), nil
}
return newFrontierInstructionSet(), nil
}
// Stack returns the minimum and maximum stack requirements.
func (op *operation) Stack() (int, int) {
return op.minStack, op.maxStack