From cda413d5432948dbe344868ab990c78d99cc4520 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Thu, 2 Aug 2018 13:29:52 +0700 Subject: [PATCH] Refactor search callback args --- mythril/leveldb/client.py | 2 +- mythril/mythril.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mythril/leveldb/client.py b/mythril/leveldb/client.py index aad40cc1..daa3b528 100644 --- a/mythril/leveldb/client.py +++ b/mythril/leveldb/client.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 diff --git a/mythril/mythril.py b/mythril/mythril.py index 9b7b69b5..9209eb21 100644 --- a/mythril/mythril.py +++ b/mythril/mythril.py @@ -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)