make transactions BIP-125 replace-by-fee by default

This commit is contained in:
The MMGen Project 2024-02-27 17:46:52 +00:00
commit 6f0751b8c9
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
7 changed files with 12 additions and 8 deletions

View file

@ -1 +1 @@
14.1.dev13
14.1.dev14

View file

@ -43,7 +43,8 @@ opts_data = {
-m, --minconf= n Minimum number of confirmations required to spend
outputs (default: 1)
-q, --quiet Suppress warnings; overwrite files without prompting
-r, --rbf Make transaction BIP 125 replaceable (replace-by-fee)
-R, --no-rbf Make transaction non-replaceable (non-replace-by-fee
according to BIP 125)
-v, --verbose Produce more verbose output
-y, --yes Answer 'yes' to prompts, suppress non-essential output
-R, --rpc-host2= h Host the other coin daemon is running on (default: none)

View file

@ -55,7 +55,8 @@ opts_data = {
-m, --minconf= n Minimum number of confirmations required to spend
outputs (default: 1)
-q, --quiet Suppress warnings; overwrite files without prompting
-r, --rbf Make transaction BIP 125 replaceable (replace-by-fee)
-R, --no-rbf Make transaction non-replaceable (non-replace-by-fee
according to BIP 125)
-v, --verbose Produce more verbose output
-V, --vsize-adj= f Adjust transaction's estimated vsize by factor 'f'
-y, --yes Answer 'yes' to prompts, suppress non-essential output

View file

@ -75,7 +75,8 @@ opts_data = {
-p, --hash-preset= p Use the scrypt hash parameters defined by preset 'p'
for password hashing (default: '{gc.dfl_hash_preset}')
-P, --passwd-file= f Get {pnm} wallet passphrase from file 'f'
-r, --rbf Make transaction BIP 125 (replace-by-fee) replaceable
-R, --no-rbf Make transaction non-replaceable (non-replace-by-fee
according to BIP 125)
-q, --quiet Suppress warnings; overwrite files without prompting
-u, --subseeds= n The number of subseed pairs to scan for (default: {ss},
maximum: {ss_max}). Only the default or first supplied

View file

@ -113,7 +113,8 @@ class New(Base,TxBase.New):
if not bump:
self.inputs.sort_bip69()
# Set all sequence numbers to the same value, in conformity with the behavior of most modern wallets:
seqnum_val = self.proto.max_int - (2 if self.cfg.rbf else 1 if locktime else 0)
do_rbf = self.proto.cap('rbf') and not self.cfg.no_rbf
seqnum_val = self.proto.max_int - (2 if do_rbf else 1 if locktime else 0)
for i in self.inputs:
i.sequence = seqnum_val

View file

@ -629,7 +629,7 @@ class CmdTestMain(CmdTestBase,CmdTestShared):
t = self.spawn(
'mmgen-'+('txcreate','txdo')[bool(txdo_args)],
([],['--rbf'])[self.proto.cap('rbf')] +
(['--no-rbf'],[])[self.proto.cap('rbf')] +
['-f',self.tx_fee,'-B'] + add_args + cmd_args + txdo_args)
if t.expect([('Get','Unsigned transac')[cmdline_inputs],r'Unable to connect to \S+'],regex=True) == 1:

View file

@ -986,7 +986,7 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared):
if not self.test_rbf:
return 'skip'
out_addr = self._create_tx_outputs('alice',(('B',5,''),))
t = self.spawn('mmgen-txcreate',['-d',self.tr.trash_dir,'-B','--bob','--rbf'] + out_addr)
t = self.spawn('mmgen-txcreate',['-d',self.tr.trash_dir,'-B','--bob'] + out_addr)
return self.txcreate_ui_common(t,menu=[],inputs='3',interactive_fee='3s') # out amt: 199.99999343
def bob_rbf_1output_bump(self):
@ -1006,7 +1006,7 @@ class CmdTestRegtest(CmdTestBase,CmdTestShared):
outputs_cl = self._create_tx_outputs('alice',(('L',1,',60'),('C',1,',40'))) # alice_sid:L:1, alice_sid:C:1
outputs_cl += [self._user_sid('bob')+':'+rtBobOp3]
return self.user_txdo('bob',rtFee[1],outputs_cl,'3',
extra_args = ([],['--rbf'])[self.proto.cap('rbf')],
extra_args = (['--no-rbf'],[])[self.proto.cap('rbf')],
used_chg_addr_resp = 'y' )
def bob_send_non_mmgen(self):