Skip to content

Commit aa57590

Browse files
committed
Update importprivkey named args documentation
Fixes #11462. Updated documentation for importprivkey function to use the correct name for the first argument. Also updates a call to importprivkey to use named args in functional test.
1 parent 17f2ace commit aa57590

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wallet/rpcdump.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ UniValue importprivkey(const JSONRPCRequest& request)
8080

8181
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
8282
throw std::runtime_error(
83-
"importprivkey \"bitcoinprivkey\" ( \"label\" ) ( rescan )\n"
83+
"importprivkey \"privkey\" ( \"label\" ) ( rescan )\n"
8484
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
8585
"\nArguments:\n"
86-
"1. \"bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n"
86+
"1. \"privkey\" (string, required) The private key (see dumpprivkey)\n"
8787
"2. \"label\" (string, optional, default=\"\") An optional label\n"
8888
"3. rescan (boolean, optional, default=true) Rescan the wallet for transactions\n"
8989
"\nNote: This call can take minutes to complete if rescan is true.\n"

test/functional/importprunedfunds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def run_test(self):
7878
assert_equal(balance2, Decimal('0.05'))
7979

8080
#Import with private key with no rescan
81-
self.nodes[1].importprivkey(address3_privkey, "add3", False)
81+
self.nodes[1].importprivkey(privkey=address3_privkey, label="add3", rescan=False)
8282
self.nodes[1].importprunedfunds(rawtxn3, proof3)
8383
balance3 = self.nodes[1].getbalance("add3", 0, False)
8484
assert_equal(balance3, Decimal('0.025'))

0 commit comments

Comments
 (0)