diff --git a/lbry/wallet/ledger.py b/lbry/wallet/ledger.py index 73d065914..dd8c6812b 100644 --- a/lbry/wallet/ledger.py +++ b/lbry/wallet/ledger.py @@ -750,7 +750,7 @@ class Ledger(metaclass=LedgerRegistry): ))[1] if record['history'] else [] for txid, local_height in local_history: if txid == tx.id: - if local_height >= height: + if local_height >= height or (local_height == 0 and height > local_height): return True log.warning( "local history has higher height than remote for %s (%i vs %i)", txid, diff --git a/tests/unit/wallet/test_database.py b/tests/unit/wallet/test_database.py index b796a9c1a..8c0b4e9f8 100644 --- a/tests/unit/wallet/test_database.py +++ b/tests/unit/wallet/test_database.py @@ -470,7 +470,7 @@ class TestUpgrade(AsyncioTestCase): class TestSQLiteRace(AsyncioTestCase): - max_misuse_attempts = 40000 + max_misuse_attempts = 80000 def setup_db(self): self.db = sqlite3.connect(":memory:", isolation_level=None)