mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #11465: rpc: Update named args documentation for importprivkey
aa57590d7
Update importprivkey named args documentation (Dusty Williams)
Pull request description:
Addresses issue #11462 by updating the documentation for the importprivkey arguments to the correct names, and updates the functional test importprunedfunds.py to use named arguments when calling importprivkey.
Tree-SHA512: 64e14bf89c8c6eec9c37f6ec0c9fc0012fdb035d9ec32cd652110c75abaa922ec5c7523d6ec5098c8a7b42124159b5e330e070974eb79b8b92816f8d61074523
This commit is contained in:
parent
1313ee3d46
commit
f8f55c25c8
@ -80,10 +80,10 @@ UniValue importprivkey(const JSONRPCRequest& request)
|
||||
|
||||
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
|
||||
throw std::runtime_error(
|
||||
"importprivkey \"dashprivkey\" ( \"label\" ) ( rescan )\n"
|
||||
"importprivkey \"privkey\" ( \"label\" ) ( rescan )\n"
|
||||
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
|
||||
"\nArguments:\n"
|
||||
"1. \"dashprivkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
|
||||
"2. \"label\" (string, optional, default=\"\") An optional label\n"
|
||||
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
|
||||
"\nNote: This call can take minutes to complete if rescan is true.\n"
|
||||
|
@ -82,7 +82,7 @@ class ImportPrunedFundsTest(BitcoinTestFramework):
|
||||
assert_equal(balance2, Decimal('0.05'))
|
||||
|
||||
#Import with private key with no rescan
|
||||
self.nodes[1].importprivkey(address3_privkey, "add3", False)
|
||||
self.nodes[1].importprivkey(privkey=address3_privkey, label="add3", rescan=False)
|
||||
result3 = self.nodes[1].importprunedfunds(rawtxn3, proof3)
|
||||
balance3 = self.nodes[1].getbalance("add3", 0, False, False)
|
||||
assert_equal(balance3, Decimal('0.025'))
|
||||
|
Loading…
Reference in New Issue
Block a user