From f5ccb8efdc7e1680fd9a6190921ded5d8814639e Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 20 May 2020 23:19:08 -0300 Subject: [PATCH] more logs --- lbry/wallet/ledger.py | 4 +++- lbry/wallet/manager.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 92cbf93a5..b1b9cede8 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -640,6 +640,7 @@ class Ledger(metaclass=LedgerRegistry): return self.network.broadcast(hexlify(tx.raw).decode()) async def wait(self, tx: Transaction, height=-1, timeout=1): + log.info("waiting for tx %s with timeout %s seconds", tx.id, timeout) timeout = timeout or 600 # after 10 minutes there is almost 0 hope addresses = set() for txi in tx.inputs: @@ -653,6 +654,7 @@ class Ledger(metaclass=LedgerRegistry): start = int(time.perf_counter()) while timeout and (int(time.perf_counter()) - start) <= timeout: if await self._wait_round(tx, height, addresses): + log.info("got reply for tx %s with timeout %s seconds", tx.id, timeout) return raise asyncio.TimeoutError('Timed out waiting for transaction.') @@ -675,7 +677,7 @@ class Ledger(metaclass=LedgerRegistry): if txid == tx.id and local_height >= height: found = True if not found: - log.debug("timeout: %s, %s, %s", record['history'], addresses, tx.id) + log.info("timeout: %s, %s, %s", record['history'], addresses, tx.id) return False return True diff --git a/lbry/wallet/manager.py b/lbry/wallet/manager.py index 20658a2e5..a9db04f3b 100644 --- a/lbry/wallet/manager.py +++ b/lbry/wallet/manager.py @@ -298,7 +298,9 @@ class WalletManager: async def broadcast_or_release(self, tx, blocking=False): try: + log.info("broadcasting %s", tx.id) await self.ledger.broadcast(tx) + log.info("broadcasted %s", tx.id) if blocking: await self.ledger.wait(tx, timeout=None) except: