1
0

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
This commit is contained in:
SomberNight
2021-06-07 20:11:56 +02:00
parent fbf76af2c5
commit 7e6d65ec11

View File

@@ -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