You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#27757: rpc: remove deprecated "warning" field from {create,load,restore,unload}wallet
5524fa0 doc: add release note about removal of `deprecatedrpc=walletwarningfield` flag (Sebastian Falbesoner)
5c77db7 Restorewallet/createwallet help documentation fixups/improvements (Jon Atack)
a00ae31 rpc: remove deprecated "warning" field from {create,load,restore,unload}wallet (Sebastian Falbesoner)
Pull request description:
The "warning" string field for wallet creating/loading RPCs (`createwallet`, `loadwallet`, `unloadwallet` and `restorewallet`) has been deprecated with the configuration option `-deprecatedrpc=walletwarningfield` in PR bitcoin#27279 (released in v25.0). For the next release v26.0, the field and the configuration option can be removed.
ACKs for top commit:
achow101:
ACK 5524fa0
jonatack:
ACK 5524fa0
Tree-SHA512: 8212f72067d08095304018b8a95d2ebef630004b65123483fbbfb078cc5709c2d825bbc35b16ea5f6b28ae7377347382d7e9afaf7bdbf0575d2c229d970784de
"\nLoads a wallet from a wallet file or directory."
448
-
"\nNote that all wallet command-line options used when starting dashd will be"
449
-
"\napplied to the new wallet (eg, rescan, etc).\n",
450
-
{
451
-
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
452
-
{"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED_NAMED_ARG, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."},
453
-
},
454
-
RPCResult{
455
-
RPCResult::Type::OBJ, "", "",
456
-
{
457
-
{RPCResult::Type::STR, "name", "The wallet name if loaded successfully."},
458
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not loaded cleanly."},
459
-
}
460
-
},
461
-
RPCExamples{
462
-
HelpExampleCli("loadwallet", "\"test.dat\"")
463
-
+ HelpExampleRpc("loadwallet", "\"test.dat\"")
464
-
},
447
+
"\nLoads a wallet from a wallet file or directory."
448
+
"\nNote that all wallet command-line options used when starting dashd will be"
449
+
"\napplied to the new wallet.\n",
450
+
{
451
+
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
452
+
{"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."},
453
+
},
454
+
RPCResult{
455
+
RPCResult::Type::OBJ, "", "",
456
+
{
457
+
{RPCResult::Type::STR, "name", "The wallet name if loaded successfully."},
458
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to loading the wallet.",
459
+
{
460
+
{RPCResult::Type::STR, "", ""},
461
+
}},
462
+
}
463
+
},
464
+
RPCExamples{
465
+
HelpExampleCli("loadwallet", "\"test.dat\"")
466
+
+ HelpExampleRpc("loadwallet", "\"test.dat\"")
467
+
},
468
+
>>>>>>> f0758d8a66 (Merge bitcoin/bitcoin#27757: rpc: remove deprecated "warning" field from {create,load,restore,unload}wallet)
{RPCResult::Type::STR, "name", "The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path."},
576
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not loaded cleanly."},
580
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to creating and loading the wallet.",
"Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.\n"
654
-
"Specifying the wallet name on a wallet endpoint is invalid.",
655
-
{
656
-
{"wallet_name", RPCArg::Type::STR, RPCArg::DefaultHint{"the wallet name from the RPC endpoint"}, "The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical."},
657
-
{"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED_NAMED_ARG, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."},
658
-
},
659
-
RPCResult{RPCResult::Type::OBJ, "", "", {
660
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not unloaded cleanly."},
661
-
}},
662
-
RPCExamples{
663
-
HelpExampleCli("unloadwallet", "wallet_name")
664
-
+ HelpExampleRpc("unloadwallet", "wallet_name")
665
-
},
660
+
"Unloads the wallet referenced by the request endpoint, otherwise unloads the wallet specified in the argument.\n"
661
+
"Specifying the wallet name on a wallet endpoint is invalid.",
662
+
{
663
+
{"wallet_name", RPCArg::Type::STR, RPCArg::DefaultHint{"the wallet name from the RPC endpoint"}, "The name of the wallet to unload. If provided both here and in the RPC endpoint, the two must be identical."},
664
+
{"load_on_startup", RPCArg::Type::BOOL, RPCArg::Optional::OMITTED, "Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged."},
665
+
},
666
+
RPCResult{RPCResult::Type::OBJ, "", "", {
667
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to unloading the wallet.",
EMPTY_PASSPHRASE_MSG="Empty string given as passphrase, wallet will not be encrypted."
19
+
LEGACY_WALLET_MSG="Wallet created successfully. The legacy wallet type is being deprecated and support for creating and opening legacy wallets will be removed in the future."
assert_raises_rpc_error(-15, 'Error: running with an unencrypted wallet, but walletpassphrase was called.', w7.walletpassphrase, '', 60)
163
166
@@ -170,5 +173,19 @@ def run_test(self):
170
173
self.log.info('Using a passphrase with private keys disabled returns error')
171
174
assert_raises_rpc_error(-4, 'Passphrase provided but private keys are disabled. A passphrase is only used to encrypt private keys, so cannot be used for wallets with private keys disabled.', self.nodes[0].createwallet, wallet_name='w9', disable_private_keys=True, passphrase='thisisapassphrase')
0 commit comments