Skip to content

Commit be4efb1

Browse files
committed
rpc: Mention getwalletinfo where a rescan is triggered
1 parent 2d1583e commit be4efb1

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/wallet/rpcdump.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ UniValue importprivkey(const JSONRPCRequest& request)
116116
"\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n"
117117
"Hint: use importmulti to import more than one private key.\n"
118118
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
119-
"may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n",
119+
"may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
120+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
120121
{
121122
{"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The private key (see dumpprivkey)"},
122123
{"label", RPCArg::Type::STR, /* default */ "current label if address exists, otherwise \"\"", "An optional label"},
@@ -220,7 +221,8 @@ UniValue abortrescan(const JSONRPCRequest& request)
220221
if (request.fHelp || request.params.size() > 0)
221222
throw std::runtime_error(
222223
RPCHelpMan{"abortrescan",
223-
"\nStops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.\n",
224+
"\nStops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call.\n"
225+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
224226
{},
225227
RPCResults{},
226228
RPCExamples{
@@ -290,7 +292,8 @@ UniValue importaddress(const JSONRPCRequest& request)
290292
"may report that the imported address exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
291293
"If you have the full public key, you should call importpubkey instead of this.\n"
292294
"\nNote: If you import a non-standard raw script in hex form, outputs sending to it will be treated\n"
293-
"as change, and not show up in many RPCs.\n",
295+
"as change, and not show up in many RPCs.\n"
296+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
294297
{
295298
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The Bitcoin address (or hex-encoded script)"},
296299
{"label", RPCArg::Type::STR, /* default */ "\"\"", "An optional label"},
@@ -487,7 +490,8 @@ UniValue importpubkey(const JSONRPCRequest& request)
487490
RPCHelpMan{"importpubkey",
488491
"\nAdds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.\n"
489492
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
490-
"may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n",
493+
"may report that the imported pubkey exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.\n"
494+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
491495
{
492496
{"pubkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The hex-encoded public key"},
493497
{"label", RPCArg::Type::STR, /* default */ "\"\"", "An optional label"},
@@ -568,7 +572,8 @@ UniValue importwallet(const JSONRPCRequest& request)
568572
if (request.fHelp || request.params.size() != 1)
569573
throw std::runtime_error(
570574
RPCHelpMan{"importwallet",
571-
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.\n",
575+
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.\n"
576+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
572577
{
573578
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet file"},
574579
},
@@ -1359,7 +1364,8 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
13591364
"If an address/script is imported without all of the private keys required to spend from that address, it will be watchonly. The 'watchonly' option must be set to true in this case or a warning will be returned.\n"
13601365
"Conversely, if all the private keys are provided and the address/script is spendable, the watchonly option must be set to false, or a warning will be returned.\n"
13611366
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
1362-
"may report that the imported keys, addresses or scripts exists but related transactions are still missing.\n",
1367+
"may report that the imported keys, addresses or scripts exist but related transactions are still missing.\n"
1368+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
13631369
{
13641370
{"requests", RPCArg::Type::ARR, RPCArg::Optional::NO, "Data to be imported",
13651371
{

src/wallet/rpcwallet.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3452,7 +3452,8 @@ UniValue rescanblockchain(const JSONRPCRequest& request)
34523452
if (request.fHelp || request.params.size() > 2) {
34533453
throw std::runtime_error(
34543454
RPCHelpMan{"rescanblockchain",
3455-
"\nRescan the local blockchain for wallet related transactions.\n",
3455+
"\nRescan the local blockchain for wallet related transactions.\n"
3456+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
34563457
{
34573458
{"start_height", RPCArg::Type::NUM, /* default */ "0", "block height where the rescan should start"},
34583459
{"stop_height", RPCArg::Type::NUM, RPCArg::Optional::OMITTED_NAMED_ARG, "the last block height that should be scanned. If none is provided it will rescan up to the tip at return time of this call."},

0 commit comments

Comments
 (0)