feat: Threaded resolution of txs and tokens #12

Open
lash wants to merge 11 commits from lash/thread into master
2 changed files with 0 additions and 6 deletions
Showing only changes of commit fb335e29ca - Show all commits

View File

@ -185,7 +185,6 @@ Tags: {}""".format(
l = token_result_queue.get()
if l == None:
break
#ctrl.write(' {} {}'.format(l[0], l[1]))
token_buf += ' {} {}\n'.format(l[0], l[1])
ctrl.notify('wait for token resolver to finish work')
@ -206,7 +205,6 @@ class MetadataResolverWorker(threading.Thread):
def __init__(self, wallet_address, ctrl, user_address_store):
self.user_address_store = user_address_store
self.wallet_address = wallet_address
#tx.resolve(self.token_store, self.user_address_store, show_decimals=self.show_decimals, update=self.update)
self.ctrl = ctrl
super(MetadataResolverWorker, self).__init__()
@ -238,9 +236,6 @@ class TxResolverWorker(threading.Thread):
self.ctrl.notify('resolve details for tx {}'.format(self.tx_hash))
tx = ResolvedTokenTx.from_dict(self.tx_src)
tx.resolve(self.token_store, self.user_address_store, show_decimals=self.show_decimals, update=self.update, lookup=False)
#tx.resolve_tokens(self.token_store, self.user_address_store, show_decimals=self.show_decimals, update=self.update)
#self.token_queue.put_nowait(tx.source_token)
#self.token_queue.put_nowait(tx.destination_token)
self.tx_store.put(self.tx_hash, str(self.tx_src), overwrite=self.ctrl.get('_FORCE_ALL'))
self.tx_queue.put(tx)

View File

@ -244,7 +244,6 @@ class FileUserStore:
def by_address(self, address, update=False, lookup=True):
address = tx_normalize.wallet_address(address)
address = strip_0x(address)
#if self.failed_entities.get(address):
if self.is_dud(address):
logg.debug('already tried and failed {}, skipping'.format(address))
raise MetadataNotFoundError()