Skip to content

Commit

Permalink
mempool: fix clearing completed tx cache
Browse files Browse the repository at this point in the history
  • Loading branch information
afalaleev committed Nov 27, 2024
1 parent 6281d32 commit 9e8a4d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxy/mempool/transaction_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def done_tx(self, neon_tx_hash: EthTxHash) -> None:
self._tx_queue.append(item)

def pop_tx(self, neon_tx_hash: EthTxHash) -> None:
self._tx_hash_dict.pop(neon_tx_hash, None)
if tx := self._tx_hash_dict.pop(neon_tx_hash, None):
self._sender_nonce_dict.pop(SenderNonce.from_raw(tx), None)

def get_tx_by_hash(self, neon_tx_hash: EthTxHash) -> NeonTxModel | None:
if tx := self._tx_hash_dict.get(neon_tx_hash, None):
Expand Down

0 comments on commit 9e8a4d6

Please sign in to comment.