forked from LBRYCommunity/lbry-sdk
fix mempool conflicts following cancelled api calls that send transactions with the blocking
flag
This commit is contained in:
parent
ae53062518
commit
872b89ee93
1 changed files with 2 additions and 5 deletions
|
@ -300,11 +300,8 @@ class WalletManager:
|
||||||
async def broadcast_or_release(self, tx, blocking=False):
|
async def broadcast_or_release(self, tx, blocking=False):
|
||||||
try:
|
try:
|
||||||
await self.ledger.broadcast(tx)
|
await self.ledger.broadcast(tx)
|
||||||
if blocking:
|
|
||||||
await self.ledger.wait(tx, timeout=None)
|
|
||||||
except CodeMessageError as err:
|
|
||||||
log.warning("transaction rejected, leaving reserved")
|
|
||||||
raise
|
|
||||||
except:
|
except:
|
||||||
await self.ledger.release_tx(tx)
|
await self.ledger.release_tx(tx)
|
||||||
raise
|
raise
|
||||||
|
if blocking:
|
||||||
|
await self.ledger.wait(tx, timeout=None)
|
||||||
|
|
Loading…
Reference in a new issue