mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge a6878b8080 into merged_master (Elements PR #696)
This commit is contained in:
commit
adceec0ffe
3 changed files with 6 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg
|
|||
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
|
||||
{
|
||||
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
|
||||
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
|
||||
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:7041/\n";
|
||||
}
|
||||
|
||||
// Converts a hex string to a public key if possible
|
||||
|
|
|
|||
|
|
@ -5183,7 +5183,7 @@ UniValue sendtomainchain_pak(const JSONRPCRequest& request)
|
|||
|
||||
bool subtract_fee = false;
|
||||
if (request.params.size() > 2) {
|
||||
subtract_fee = request.params[1].get_bool();
|
||||
subtract_fee = request.params[2].get_bool();
|
||||
}
|
||||
|
||||
CPAKList paklist = g_paklist_blockchain;
|
||||
|
|
|
|||
|
|
@ -410,6 +410,10 @@ class PAKTest (BitcoinTestFramework):
|
|||
raise Exception("Found unexpected peg-out output")
|
||||
assert peg_out_found
|
||||
|
||||
# Test that subtracting fee from output works
|
||||
self.nodes[i_pak1].sendtomainchain("", self.nodes[i_pak1].getbalance()["bitcoin"], True)
|
||||
assert_equal(self.nodes[i_pak1].getbalance()["bitcoin"], 0)
|
||||
|
||||
# TODO: create rawsendtomainchain to do transaction surgery for testing
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue