1
0

use maxint-2 to signal RBF, in order to standardize with Bitcoin Core

This commit is contained in:
ThomasV
2017-03-13 11:02:25 +01:00
parent a2fcb2ba8f
commit 2d8df85aab
5 changed files with 9 additions and 8 deletions

View File

@@ -148,7 +148,7 @@ class TxDialog(Factory.Popup):
self.app.show_error(str(e))
return
if is_final:
new_tx.set_sequence(0xffffffff)
new_tx.set_rbf(False)
self.tx = new_tx
self.update()
self.do_sign()

View File

@@ -284,7 +284,7 @@ class SendScreen(CScreen):
self.app.show_error(str(e))
return
if rbf:
tx.set_sequence(0)
tx.set_rbf(True)
fee = tx.get_fee()
msg = [
_("Amount to be sent") + ": " + self.app.format_amount_and_units(amount),

View File

@@ -1306,7 +1306,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
use_rbf = self.rbf_checkbox.isChecked()
if use_rbf:
tx.set_sequence(0)
tx.set_rbf(True)
if fee < self.wallet.relayfee() * tx.estimated_size() / 1000 and tx.requires_fee(self.wallet):
self.show_error(_("This transaction requires a higher fee, or it will not be propagated by the network"))
@@ -2823,7 +2823,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.show_error(_('Max fee exceeded'))
return
new_tx = self.wallet.cpfp(parent_tx, fee)
new_tx.set_sequence(0)
new_tx.set_rbf(True)
self.show_transaction(new_tx)
def bump_fee_dialog(self, tx):
@@ -2860,5 +2860,5 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
self.show_error(str(e))
return
if is_final:
new_tx.set_sequence(0xffffffff)
new_tx.set_rbf(False)
self.show_transaction(new_tx)