Skip to content

Commit 9d103a9

Browse files
committed
Merge a6878b8 into merged_master (Elements PR ElementsProject#696)
2 parents 842ddc0 + a6878b8 commit 9d103a9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/rpc/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg
119119
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
120120
{
121121
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
122-
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
122+
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:7041/\n";
123123
}
124124

125125
// Converts a hex string to a public key if possible

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5183,7 +5183,7 @@ UniValue sendtomainchain_pak(const JSONRPCRequest& request)
51835183

51845184
bool subtract_fee = false;
51855185
if (request.params.size() > 2) {
5186-
subtract_fee = request.params[1].get_bool();
5186+
subtract_fee = request.params[2].get_bool();
51875187
}
51885188

51895189
CPAKList paklist = g_paklist_blockchain;

test/functional/feature_pak.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

415419
if __name__ == '__main__':

0 commit comments

Comments
 (0)