pending-opcodes
e-ngo 5 years ago
parent 1a0ea91267
commit 268d5d3bbb
  1. 6
      tests/instructions/extcodehash_test.py

@ -11,6 +11,7 @@ from mythril.support.support_utils import get_code_hash
from mythril.laser.smt import symbol_factory
def test_extcodehash_concrete():
# Arrange
world_state = WorldState()
@ -35,7 +36,10 @@ def test_extcodehash_concrete():
# If account code does not exist, return hash of empty set.
og_state.mstate.stack = [symbol_factory.BitVecVal(1000, 256)]
new_state = instruction.evaluate(og_state)[0]
assert new_state.mstate.stack[-1] == '0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470'
assert (
new_state.mstate.stack[-1]
== "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
)
# If account code exists, return hash of the code.
og_state.mstate.stack = [symbol_factory.BitVecVal(101, 256)]

Loading…
Cancel
Save