Refactor search callback args

pull/407/head
Bernhard Mueller 6 years ago
parent b904c8af50
commit cda413d543
  1. 2
      mythril/leveldb/client.py
  2. 6
      mythril/mythril.py

@ -204,7 +204,7 @@ class EthLevelDB(object):
except AddressNotFoundError:
address = _encode_hex(address_hash)
callback_func(contract.name, contract, [address], [balance])
callback_func(contract, address, balance)
cnt += 1

@ -272,9 +272,9 @@ class Mythril(object):
def search_db(self, search):
def search_callback(code_hash, code, addresses, balances):
for i in range(0, len(addresses)):
print("Address: " + addresses[i] + ", balance: " + str(balances[i]))
def search_callback(contract, address, balance):
print("Address: " + address + ", balance: " + str(balance))
try:
self.eth_db.search(search, search_callback)

Loading…
Cancel
Save