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/bitcoin#27279: Add "warnings", deprecate "warning" in {create,load,unload,restore}wallet
7ccdd74 test: fix importmulti/importdescriptors assertion (Jon Atack)
19d888c rpc: move WALLET_FLAG_CAVEATS to the compilation unit of its caller (Jon Atack)
01df011 doc: release note for wallet RPCs "warning" field deprecation (Jon Atack)
9ea8b37 test: createwallet "warning" field deprecation test (Jon Atack)
645d7f7 rpc: deprecate "warning" field in {create,load,unload,restore}wallet (Jon Atack)
2f4a926 test: add test coverage for "warnings" field in createwallet (Jon Atack)
4a1e479 rpc: add "warnings" field to RPCs {create,load,unload,restore}wallet (Jon Atack)
079d8cd rpc: extract wallet "warnings" fields to a util helper (Jon Atack)
f73782a doc: fix/improve warning helps in {create,load,unload,restore}wallet (Jon Atack)
Pull request description:
Based on discussion and concept ACKed in #27138, add a `warnings` field to RPCs createwallet, loadwallet, unloadwallet, and restorewallet as a JSON array of strings to replace the `warning` string field in these 4 RPCs. The idea is to more gracefully handle multiple warning messages and for consistency with other wallet RPCs. Then, deprecate the latter fields, which represent all the remaining RPC `warning` fields.
The first commit bitcoin/bitcoin@f73782a implements bitcoin/bitcoin#27138 (comment) as an alternative to #27138. One of those two could potentially be backported to our currently supported releases.
ACKs for top commit:
achow101:
ACK 7ccdd74
1440000bytes:
utACK bitcoin/bitcoin@7ccdd74
vasild:
ACK 7ccdd74
pinheadmz:
re-ACK 7ccdd74
Tree-SHA512: 314e0a4c41fa383d95e2817bfacf359d449e460529d235c3eb902851e2f4eacbabe646d9a5a4beabc4964cdfabf6397ed8301366a58d344a2f787f83b75e9d64
{RPCResult::Type::STR, "name", "The wallet name if restored successfully."},
1906
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not loaded cleanly."},
1906
+
{RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to restoring the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"},
1907
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to restoring the wallet.",
{RPCResult::Type::STR, "name", "The wallet name if loaded successfully."},
210
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not loaded cleanly."},
219
+
{RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to loading the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"},
220
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to loading the 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."},
338
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not loaded cleanly."},
354
+
{RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to creating the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"},
355
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to creating the wallet.",
{"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."},
423
446
},
424
447
RPCResult{RPCResult::Type::OBJ, "", "", {
425
-
{RPCResult::Type::STR, "warning", "Warning message if wallet was not unloaded cleanly."},
448
+
{RPCResult::Type::STR, "warning", /*optional=*/true, "Warning messages, if any, related to unloading the wallet. Multiple messages will be delimited by newlines. (DEPRECATED, returned only if config option -deprecatedrpc=walletwarningfield is passed.)"},
449
+
{RPCResult::Type::ARR, "warnings", /*optional=*/true, "Warning messages, if any, related to unloading the wallet.",
0 commit comments