mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-13 11:35:20 +01:00
doc: loadwallet loads from relative walletdir
Improves the documentation of help output for loadwallet to clarify that filename is relative to the default wallet directory. Adds examples that get a wallet from sub-directories.
This commit is contained in:
parent
43e287b3ff
commit
ca6aa0b9be
1 changed files with 10 additions and 3 deletions
|
@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
|
||||||
"\nNote that all wallet command-line options used when starting bitcoind will be"
|
"\nNote that all wallet command-line options used when starting bitcoind will be"
|
||||||
"\napplied to the new wallet.\n",
|
"\napplied to the new wallet.\n",
|
||||||
{
|
{
|
||||||
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
|
{"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the directory of the wallet to be loaded, either absolute or relative to the \"wallets\" directory. The \"wallets\" directory is set by the -walletdir option and defaults to the \"wallets\" folder within the data directory."},
|
||||||
{"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."},
|
{"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."},
|
||||||
},
|
},
|
||||||
RPCResult{
|
RPCResult{
|
||||||
|
@ -234,8 +234,15 @@ static RPCHelpMan loadwallet()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RPCExamples{
|
RPCExamples{
|
||||||
HelpExampleCli("loadwallet", "\"test.dat\"")
|
"\nLoad wallet from the wallet dir:\n"
|
||||||
+ HelpExampleRpc("loadwallet", "\"test.dat\"")
|
+ HelpExampleCli("loadwallet", "\"walletname\"")
|
||||||
|
+ HelpExampleRpc("loadwallet", "\"walletname\"")
|
||||||
|
+ "\nLoad wallet using absolute path (Unix):\n"
|
||||||
|
+ HelpExampleCli("loadwallet", "\"/path/to/walletname/\"")
|
||||||
|
+ HelpExampleRpc("loadwallet", "\"/path/to/walletname/\"")
|
||||||
|
+ "\nLoad wallet using absolute path (Windows):\n"
|
||||||
|
+ HelpExampleCli("loadwallet", "\"DriveLetter:\\path\\to\\walletname\\\"")
|
||||||
|
+ HelpExampleRpc("loadwallet", "\"DriveLetter:\\path\\to\\walletname\\\"")
|
||||||
},
|
},
|
||||||
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue