HomePhabricator

[avalanche] Remove invalidated transactions from the mempool

Description

[avalanche] Remove invalidated transactions from the mempool

Summary:
It is possible for a transaction the be invalidated when in the mempool: if 2 conflicting transactions are both rejected one of them is lastly pulled back to mempool where invalidation can happen. We need to make sure we remove such a tx from the mempool and not assume it's already been removed.

To do so we simply apply the same logic to rejection and invalidation, with the additional steps for invalidation.

Test Plan:

./test/functional/test_runner.py abc_p2p_avalanche_transaction_voting

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D18569

Details

Provenance
FabienAuthored on Sep 4 2025, 20:36
FabienPushed on Sep 5 2025, 08:26
Reviewer
Restricted Project
Differential Revision
D18569: [avalanche] Remove invalidated transactions from the mempool
Parents
rABC234fea26fe8c: [chronik] Electrum: fix a potential deadlock in scripthash_or_address_suscribe
Branches
Unknown
Tags
Unknown