@@ -34,6 +34,8 @@ def set_test_params(self):
34
34
"-limitancestorsize=101" ,
35
35
"-limitdescendantcount=200" ,
36
36
"-limitdescendantsize=101" ,
37
+ "-mempooltruc=accept" ,
38
+ "-paytxfee=0.00001" , # this test confuses the fee estimator into nearly 1 BTC fees
37
39
],
38
40
# second node has default mempool parameters, besides mempoolfullrbf being disabled
39
41
[
@@ -99,8 +101,10 @@ def test_service_flag():
99
101
100
102
self .log .info ("Running test opt-in..." )
101
103
self .test_opt_in (fullrbf = False )
104
+ self .test_opt_in (fullrbf = False , use_truc = True )
102
105
self .nodes [0 ], self .nodes [- 1 ] = self .nodes [- 1 ], self .nodes [0 ]
103
106
self .test_opt_in (fullrbf = True )
107
+ self .test_opt_in (fullrbf = True , use_truc = True )
104
108
self .nodes [0 ], self .nodes [- 1 ] = self .nodes [- 1 ], self .nodes [0 ]
105
109
106
110
self .log .info ("Running test RPC..." )
@@ -513,7 +517,7 @@ def test_too_many_replacements_with_default_mempool_params(self):
513
517
self .generate (normal_node , 1 )
514
518
self .wallet .rescan_utxos ()
515
519
516
- def test_opt_in (self , fullrbf ):
520
+ def test_opt_in (self , fullrbf , use_truc = False ):
517
521
"""Replacing should only work if orig tx opted in"""
518
522
tx0_outpoint = self .make_utxo (self .nodes [0 ], int (1.1 * COIN ))
519
523
@@ -572,15 +576,24 @@ def test_opt_in(self, fullrbf):
572
576
# opt-in on one of the inputs
573
577
# Transaction should be replaceable on either input
574
578
579
+ self .generate (self .nodes [0 ], 1 ) # clean mempool so parent txs don't trigger BIP125
580
+ if use_truc :
581
+ kwargs = {'sequence' : SEQUENCE_FINAL , 'version' : 3 }
582
+ else :
583
+ kwargs = {'sequence' : [SEQUENCE_FINAL , 0xfffffffd ]}
584
+
575
585
tx3a_txid = self .wallet .send_self_transfer_multi (
576
586
from_node = self .nodes [0 ],
577
587
utxos_to_spend = [tx1a_utxo , tx2a_utxo ],
578
- sequence = [SEQUENCE_FINAL , 0xfffffffd ],
579
588
fee_per_output = int (0.1 * COIN ),
589
+ ** kwargs
580
590
)["txid" ]
581
591
582
592
# This transaction is shown as replaceable
583
- assert_equal (self .nodes [0 ].getmempoolentry (tx3a_txid )['bip125-replaceable' ], True )
593
+ if use_truc :
594
+ assert_equal (self .nodes [0 ].getmempoolentry (tx3a_txid )['bip125-replaceable' ], False )
595
+ else :
596
+ assert_equal (self .nodes [0 ].getmempoolentry (tx3a_txid )['bip125-replaceable' ], True )
584
597
585
598
self .wallet .send_self_transfer (
586
599
from_node = self .nodes [0 ],
0 commit comments