core, eth: unship EIP 2315
This commit is contained in:
@ -96,19 +96,6 @@ func (c *Contract) validJumpdest(dest *uint256.Int) bool {
|
||||
return c.isCode(udest)
|
||||
}
|
||||
|
||||
func (c *Contract) validJumpSubdest(udest uint64) bool {
|
||||
// PC cannot go beyond len(code) and certainly can't be bigger than 63 bits.
|
||||
// Don't bother checking for BEGINSUB in that case.
|
||||
if int64(udest) < 0 || udest >= uint64(len(c.Code)) {
|
||||
return false
|
||||
}
|
||||
// Only BEGINSUBs allowed for destinations
|
||||
if OpCode(c.Code[udest]) != BEGINSUB {
|
||||
return false
|
||||
}
|
||||
return c.isCode(udest)
|
||||
}
|
||||
|
||||
// isCode returns true if the provided PC location is an actual opcode, as
|
||||
// opposed to a data-segment following a PUSHN operation.
|
||||
func (c *Contract) isCode(udest uint64) bool {
|
||||
|
Reference in New Issue
Block a user