Skip to content

Commit 280c295

Browse files
DashCoreAutoGuixClaude Codeclaude
authored
Merge bitcoin#25680: rpc, docs: Add note for commands that supports only legacy wallets
* Merge bitcoin#25680: rpc, docs: Add note for commands that supports only legacy wallets 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Fix missing changes from Bitcoin commit 0713088 Add legacy wallet notes to addmultisigaddress and sethdseed commands that were missing from the original backport. - Add note to addmultisigaddress in addresses.cpp - Add note to sethdseed in wallet.cpp 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude Code <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent ab9198f commit 280c295

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

src/wallet/rpc/addresses.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ RPCHelpMan addmultisigaddress()
194194
"Each key is a Dash address or hex-encoded public key.\n"
195195
"This functionality is only intended for use with non-watchonly addresses.\n"
196196
"See `importaddress` for watchonly p2sh address support.\n"
197-
"If 'label' is specified, assign address to that label.\n",
197+
"If 'label' is specified, assign address to that label.\n"
198+
"Note: This command is only compatible with legacy wallets.\n",
198199
{
199200
{"nrequired", RPCArg::Type::NUM, RPCArg::Optional::NO, "The number of required signatures out of the n keys or addresses."},
200201
{"keys", RPCArg::Type::ARR, RPCArg::Optional::NO, "The Dash addresses or hex-encoded public keys",

src/wallet/rpc/backup.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ RPCHelpMan importprivkey()
8989
"\nAdds a private key (as returned by dumpprivkey) to your wallet. Requires a new wallet backup.\n"
9090
"Hint: use importmulti to import more than one private key.\n"
9191
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
92-
"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",
92+
"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"
93+
"Note: This command is only compatible with legacy wallets. Use \"importdescriptors\" with \"combo(X)\" for descriptor wallets.\n",
9394
{
9495
{"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The private key (see dumpprivkey)"},
9596
{"label", RPCArg::Type::STR, RPCArg::DefaultHint{"current label if address exists, otherwise \"\""}, "An optional label"},
@@ -209,7 +210,8 @@ RPCHelpMan importaddress()
209210
"If you have the full public key, you should call importpubkey instead of this.\n"
210211
"Hint: use importmulti to import more than one address.\n"
211212
"\nNote: If you import a non-standard raw script in hex form, outputs sending to it will be treated\n"
212-
"as change, and not show up in many RPCs.\n",
213+
"as change, and not show up in many RPCs.\n"
214+
"Note: This command is only compatible with legacy wallets. Use \"importdescriptors\" for descriptor wallets.\n",
213215
{
214216
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The Dash address (or hex-encoded script)"},
215217
{"label", RPCArg::Type::STR, RPCArg::Default{""}, "An optional label"},
@@ -400,7 +402,8 @@ RPCHelpMan importpubkey()
400402
"\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"
401403
"Hint: use importmulti to import more than one public key.\n"
402404
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
403-
"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",
405+
"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"
406+
"Note: This command is only compatible with legacy wallets. Use \"importdescriptors\" with \"combo(X)\" for descriptor wallets.\n",
404407
{
405408
{"pubkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The hex-encoded public key"},
406409
{"label", RPCArg::Type::STR, RPCArg::Default{""}, "An optional label"},
@@ -480,7 +483,8 @@ RPCHelpMan importwallet()
480483
{
481484
return RPCHelpMan{"importwallet",
482485
"\nImports keys from a wallet dump file (see dumpwallet). Requires a new wallet backup to include imported keys.\n"
483-
"Note: Use \"getwalletinfo\" to query the scanning progress.\n",
486+
"Note: Use \"getwalletinfo\" to query the scanning progress.\n"
487+
"Note: This command is only compatible with legacy wallets.\n",
484488
{
485489
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet file"},
486490
},
@@ -820,7 +824,8 @@ RPCHelpMan dumpprivkey()
820824
{
821825
return RPCHelpMan{"dumpprivkey",
822826
"\nReveals the private key corresponding to 'address'.\n"
823-
"Then the importprivkey can be used with this output\n",
827+
"Then the importprivkey can be used with this output\n"
828+
"Note: This command is only compatible with legacy wallets.\n",
824829
{
825830
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The Dash address for the private key"},
826831
},
@@ -915,7 +920,8 @@ RPCHelpMan dumpwallet()
915920
"\nDumps all wallet keys in a human-readable format to a server-side file. This does not allow overwriting existing files.\n"
916921
"Imported scripts are included in the dumpfile too, their corresponding addresses will be added automatically by importwallet.\n"
917922
"Note that if your wallet contains keys which are not derived from your HD seed (e.g. imported keys), these are not covered by\n"
918-
"only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n",
923+
"only backing up the seed itself, and must be backed up too (e.g. ensure you back up the whole dumpfile).\n"
924+
"Note: This command is only compatible with legacy wallets.\n",
919925
{
920926
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The filename with path (absolute path recommended)"},
921927
},
@@ -1467,7 +1473,8 @@ RPCHelpMan importmulti()
14671473
"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"
14681474
"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"
14691475
"\nNote: This call can take over an hour to complete if rescan is true, during that time, other rpc calls\n"
1470-
"may report that the imported keys, addresses or scripts exists but related transactions are still missing.\n",
1476+
"may report that the imported keys, addresses or scripts exists but related transactions are still missing.\n"
1477+
"Note: This command is only compatible with legacy wallets. Use \"importdescriptors\" for descriptor wallets.\n",
14711478
{
14721479
{"requests", RPCArg::Type::ARR, RPCArg::Optional::NO, "Data to be imported",
14731480
{

src/wallet/rpc/wallet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,8 +772,8 @@ static RPCHelpMan sethdseed()
772772
return RPCHelpMan{"sethdseed",
773773
"\nSet or generate a new HD wallet seed. Non-HD wallets will not be upgraded to being a HD wallet. Wallets that are already\n"
774774
"HD can not be updated to a new HD seed.\n"
775-
"\nNote that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed." +
776-
HELP_REQUIRING_PASSPHRASE,
775+
"\nNote that you will need to MAKE A NEW BACKUP of your wallet after setting the HD wallet seed." + HELP_REQUIRING_PASSPHRASE +
776+
"Note: This command is only compatible with legacy wallets.\n",
777777
{
778778
{"newkeypool", RPCArg::Type::BOOL, RPCArg::Default{true}, "Whether to flush old unused addresses, including change addresses, from the keypool and regenerate it.\n"
779779
"If true, the next address from getnewaddress and change address from getrawchangeaddress will be from this new seed.\n"

0 commit comments

Comments
 (0)