@@ -338,7 +338,8 @@ def test_sequence(self):
338338
339339 self .log .info ("Testing RBF notification" )
340340 # Replace it to test eviction/addition notification
341- payment_tx ['tx' ].vout [0 ].nValue -= 1000
341+ payment_tx ['tx' ].vout [0 ].nValue .setToAmount (payment_tx ['tx' ].vout [0 ].nValue .getAmount () - 1000 )
342+ payment_tx ['tx' ].vout [1 ].nValue .setToAmount (payment_tx ['tx' ].vout [1 ].nValue .getAmount () + 1000 )
342343 rbf_txid = self .nodes [1 ].sendrawtransaction (payment_tx ['tx' ].serialize ().hex ())
343344 self .sync_all ()
344345 assert_equal ((payment_txid , "R" , seq_num ), seq .receive_sequence ())
@@ -400,7 +401,8 @@ def test_sequence(self):
400401 for _ in range (5 ):
401402 more_tx .append (self .wallet .send_self_transfer (from_node = self .nodes [0 ]))
402403
403- orig_tx ['tx' ].vout [0 ].nValue -= 1000
404+ orig_tx ['tx' ].vout [0 ].nValue .setToAmount (orig_tx ['tx' ].vout [0 ].nValue .getAmount () - 1000 )
405+ orig_tx ['tx' ].vout [1 ].nValue .setToAmount (orig_tx ['tx' ].vout [1 ].nValue .getAmount () + 1000 )
404406 bump_txid = self .nodes [0 ].sendrawtransaction (orig_tx ['tx' ].serialize ().hex ())
405407 # Mine the pre-bump tx
406408 txs_to_add = [orig_tx ['hex' ]] + [tx ['hex' ] for tx in more_tx ]
@@ -484,7 +486,8 @@ def test_mempool_sync(self):
484486 # We have node 0 do all these to avoid p2p races with RBF announcements
485487 for _ in range (num_txs ):
486488 txs .append (self .wallet .send_self_transfer (from_node = self .nodes [0 ]))
487- txs [- 1 ]['tx' ].vout [0 ].nValue -= 1000
489+ txs [- 1 ]['tx' ].vout [0 ].nValue .setToAmount (txs [- 1 ]['tx' ].vout [0 ].nValue .getAmount () - 1000 )
490+ txs [- 1 ]['tx' ].vout [1 ].nValue .setToAmount (txs [- 1 ]['tx' ].vout [1 ].nValue .getAmount () + 1000 )
488491 self .nodes [0 ].sendrawtransaction (txs [- 1 ]['tx' ].serialize ().hex ())
489492 self .sync_all ()
490493 self .generatetoaddress (self .nodes [0 ], 1 , ADDRESS_BCRT1_UNSPENDABLE )
0 commit comments