|
|
@ -92,7 +92,7 @@ func (in *Interpreter) enforceRestrictions(op OpCode, operation operation, stack |
|
|
|
if in.readOnly { |
|
|
|
if in.readOnly { |
|
|
|
// If the interpreter is operating in readonly mode, make sure no
|
|
|
|
// If the interpreter is operating in readonly mode, make sure no
|
|
|
|
// state-modifying operation is performed. The 3rd stack item
|
|
|
|
// state-modifying operation is performed. The 3rd stack item
|
|
|
|
// for a call operation is the value. Transfering value from one
|
|
|
|
// for a call operation is the value. Transferring value from one
|
|
|
|
// account to the others means the state is modified and should also
|
|
|
|
// account to the others means the state is modified and should also
|
|
|
|
// return with an error.
|
|
|
|
// return with an error.
|
|
|
|
if operation.writes || (op == CALL && stack.Back(2).BitLen() > 0) { |
|
|
|
if operation.writes || (op == CALL && stack.Back(2).BitLen() > 0) { |
|
|
|