forked from cerc-io/plugeth
core/vm: expose jumptable constructors (#26880)
When interacting with geth as a library to e.g. produce state tests, it is desirable to obtain the consensus-correct jumptable definition for a given fork. This changes adds accessors so the instructionset can be obtained and characteristics about opcodes can be inspected.
This commit is contained in:
+3
-3
@@ -956,7 +956,7 @@ type Rules struct {
|
||||
IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool
|
||||
IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool
|
||||
IsBerlin, IsLondon bool
|
||||
IsMerge, IsShanghai, isCancun, isPrague bool
|
||||
IsMerge, IsShanghai, IsCancun, IsPrague bool
|
||||
}
|
||||
|
||||
// Rules ensures c's ChainID is not nil.
|
||||
@@ -979,7 +979,7 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
|
||||
IsLondon: c.IsLondon(num),
|
||||
IsMerge: isMerge,
|
||||
IsShanghai: c.IsShanghai(timestamp),
|
||||
isCancun: c.IsCancun(timestamp),
|
||||
isPrague: c.IsPrague(timestamp),
|
||||
IsCancun: c.IsCancun(timestamp),
|
||||
IsPrague: c.IsPrague(timestamp),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user