forked from LBRYCommunity/lbry-sdk
Merge pull request #3369 from lbryio/fix-hanging-tx-notification
fix stuck transaction notification due to race in mempool when advancing a block
This commit is contained in:
commit
f257ff2f97
2 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue