@@ -99,6 +99,9 @@ def run_test(self):
99
99
self .log .info ("Running test opt-in..." )
100
100
self .test_opt_in ()
101
101
102
+ self .log .info ("Running test RPC..." )
103
+ self .test_rpc ()
104
+
102
105
self .log .info ("Running test prioritised transactions..." )
103
106
self .test_prioritised_transactions ()
104
107
@@ -516,5 +519,25 @@ def test_prioritised_transactions(self):
516
519
517
520
assert (tx2b_txid in self .nodes [0 ].getrawmempool ())
518
521
522
+ def test_rpc (self ):
523
+ us0 = self .nodes [0 ].listunspent ()[0 ]
524
+ ins = [us0 ];
525
+ outs = {self .nodes [0 ].getnewaddress () : Decimal (1.0000000 )}
526
+ rawtx0 = self .nodes [0 ].createrawtransaction (ins , outs , 0 , True )
527
+ rawtx1 = self .nodes [0 ].createrawtransaction (ins , outs , 0 , False )
528
+ json0 = self .nodes [0 ].decoderawtransaction (rawtx0 )
529
+ json1 = self .nodes [0 ].decoderawtransaction (rawtx1 )
530
+ assert_equal (json0 ["vin" ][0 ]["sequence" ], 4294967293 )
531
+ assert_equal (json1 ["vin" ][0 ]["sequence" ], 4294967295 )
532
+
533
+ rawtx2 = self .nodes [0 ].createrawtransaction ([], outs )
534
+ frawtx2a = self .nodes [0 ].fundrawtransaction (rawtx2 , {"optIntoRbf" : True })
535
+ frawtx2b = self .nodes [0 ].fundrawtransaction (rawtx2 , {"optIntoRbf" : False })
536
+
537
+ json0 = self .nodes [0 ].decoderawtransaction (frawtx2a ['hex' ])
538
+ json1 = self .nodes [0 ].decoderawtransaction (frawtx2b ['hex' ])
539
+ assert_equal (json0 ["vin" ][0 ]["sequence" ], 4294967293 )
540
+ assert_equal (json1 ["vin" ][0 ]["sequence" ], 4294967294 )
541
+
519
542
if __name__ == '__main__' :
520
543
ReplaceByFeeTest ().main ()
0 commit comments