Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Feb 18, 2025
1 parent 05b8419 commit 55b50db
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions chia/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,13 @@ async def _handle_one_transaction(self, entry: TransactionQueueEntry) -> None:
try:
inc_status, err = await self.add_transaction(entry.transaction, entry.spend_name, peer, entry.test)
entry.done.set((inc_status, err))
# if the transaction is valid, it was added to the mempool and we
# don't need to keep it in _recent_txs anymore
try:
self._recent_txs.remove(entry.spend_name)
except KeyError:
pass
if err is None and inc_status == MempoolInclusionStatus.SUCCESS:
# if the transaction is valid, it was added to the mempool and
# we don't need to keep it in _recent_txs anymore
try:
self._recent_txs.remove(entry.spend_name)
except KeyError:
pass
except asyncio.CancelledError:
error_stack = traceback.format_exc()
self.log.debug(f"Cancelling _handle_one_transaction, closing: {error_stack}")
Expand Down

0 comments on commit 55b50db

Please sign in to comment.