1
0

wallet: minor clean-up of tx.set_rbf() calls

Better to always call it, to make sure inputs have identical sequence numbers.
This commit is contained in:
SomberNight
2021-02-11 21:52:34 +01:00
parent ca86e35724
commit 914eb9989d
5 changed files with 12 additions and 14 deletions

View File

@@ -111,8 +111,7 @@ class TxEditor:
self.main_window.show_error(str(e))
raise
use_rbf = bool(self.config.get('use_rbf', True))
if use_rbf:
self.tx.set_rbf(True)
self.tx.set_rbf(use_rbf)
def have_enough_funds_assuming_zero_fees(self) -> bool:
try:

View File

@@ -3242,7 +3242,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
except CannotCPFP as e:
self.show_error(str(e))
return
new_tx.set_rbf(True)
self.show_transaction(new_tx)
def _add_info_to_tx_from_wallet_and_network(self, tx: PartialTransaction) -> bool:
@@ -3329,8 +3328,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
except Exception as e:
self.show_error(str(e))
return
if is_final:
new_tx.set_rbf(False)
new_tx.set_rbf(not is_final)
self.show_transaction(new_tx, tx_desc=tx_label)
def bump_fee_dialog(self, tx: Transaction):