From 367ffdea1f05a0974b928477fc358a59ec2f397d Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Wed, 5 Dec 2018 23:42:16 -0500 Subject: [PATCH] may be the sync fix --- torba/client/baseledger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/torba/client/baseledger.py b/torba/client/baseledger.py index 511d98c37..26cce3da9 100644 --- a/torba/client/baseledger.py +++ b/torba/client/baseledger.py @@ -91,6 +91,7 @@ class SynchronizationMonitor: async def _monitor(self, coro): task = self.loop.create_task(coro) self.tasks.append(task) + log.info('sync tasks: %s', len(self.tasks)) try: await task finally: @@ -418,7 +419,7 @@ class BaseLedger(metaclass=LedgerRegistry): assert cache_item.tx is not None txi.txo_ref = cache_item.tx.outputs[txi.txo_ref.position].ref else: - check_db_for_txos.append(txi.txo_ref.tx_ref.id) + check_db_for_txos.append(txi.txo_ref.id) referenced_txos = { txo.id: txo for txo in await self.db.get_txos(txoid__in=check_db_for_txos) @@ -427,7 +428,7 @@ class BaseLedger(metaclass=LedgerRegistry): for txi in tx.inputs: if txi.txo_ref.txo is not None: continue - referenced_txo = referenced_txos.get(txi.txo_ref.tx_ref.id) + referenced_txo = referenced_txos.get(txi.txo_ref.id) if referenced_txo is not None: txi.txo_ref = referenced_txo.ref