File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -5195,7 +5195,7 @@ UniValue sendtomainchain_pak(const JSONRPCRequest& request)
51955195
51965196 bool subtract_fee = false ;
51975197 if (request.params .size () > 2 ) {
5198- subtract_fee = request.params [1 ].get_bool ();
5198+ subtract_fee = request.params [2 ].get_bool ();
51995199 }
52005200
52015201 CPAKList paklist = g_paklist_blockchain;
Original file line number Diff line number Diff line change @@ -410,6 +410,10 @@ def compare(actual, expected):
410410 raise Exception ("Found unexpected peg-out output" )
411411 assert (peg_out_found )
412412
413+ # Test that subtracting fee from output works
414+ self .nodes [i_pak1 ].sendtomainchain ("" , self .nodes [i_pak1 ].getbalance ()["bitcoin" ], True )
415+ assert_equal (self .nodes [i_pak1 ].getbalance ()["bitcoin" ], 0 )
416+
413417 # TODO: create rawsendtomainchain to do transaction surgery for testing
414418
415419if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments