From 7e6d65ec11c0dccfc24478471c5951d3ae586937 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 7 Jun 2021 20:11:56 +0200 Subject: [PATCH] wallet: RBF batching to only consider RBF-opted-in txs, even if local This is easier to understand; the special case is not worth it. related https://github.com/spesmilo/electrum/issues/7298 --- electrum/wallet.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/electrum/wallet.py b/electrum/wallet.py index db0906733..d29ef98bc 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -1247,12 +1247,13 @@ class Abstract_Wallet(AddressSynchronizer, ABC): # do not mutate LN funding txs, as that would change their txid if self.is_lightning_funding_tx(txid): continue + # tx must have opted-in for RBF (even if local, for consistency) + if tx.is_final(): + continue # prefer txns already in mempool (vs local) if hist_item.tx_mined_status.height == TX_HEIGHT_LOCAL: candidate = tx continue - # tx must have opted-in for RBF - if tx.is_final(): continue return tx return candidate