When creating and replacing a transaction using bumpfee
, an async update is sent in the form of the TransactionAddedToMempool
and TransactionRemovedFromMempool
signals. When wallet_backwards_compatibility.py
creates tx3_id
this way and replaces it with tx4_id
, the abandontransaction
rpc is called right after. In some cases the TransactionAddedToMempool
and TransactionRemovedFromMempool
is handled after the transaction is abandoned in the wallet, and overwrites the transaction’s abandoned
flag. This PR forces the signals to get handled before abandontransaction
is called by invoking self.sync_mempools
which calls syncwithvalidationinterfacequeue
on every node’s rpc connection.
This will mitigate the immediate inconsistency observed with the abandontransaction call, but the potential race conditions between the signals and wallet operations may also be useful to note in a separate issue (if it’s okay to not address it in this one).
Fixes #29806