Fix the tests

pull/894/head
Nikhil Parasaram 6 years ago
parent dce26a37b2
commit 8b3522ef23
  1. 7
      mythril/laser/ethereum/state/calldata.py
  2. 1
      mythril/laser/smt/bitvec.py

@ -41,7 +41,7 @@ class BaseCalldata:
"""
result = self.size
if isinstance(result, int):
return BitVec(symbol_factory.BitVecVal(result, 256))
return symbol_factory.BitVecVal(result, 256)
return result
def get_word_at(self, offset: int) -> Expression:
@ -138,10 +138,7 @@ class ConcreteCalldata(BaseCalldata):
:param item:
:return:
"""
item = cast(
BitVec,
symbol_factory.BitVecVal(item, 256) if isinstance(item, int) else item,
)
item = symbol_factory.BitVecVal(item, 256) if isinstance(item, int) else item
return simplify(self._calldata[item])
def concrete(self, model: Model) -> list:

@ -11,6 +11,7 @@ Annotations = List[Any]
# fmt: off
class BitVec(Expression[z3.BitVecRef]):
"""A bit vector symbol."""

Loading…
Cancel
Save