am-sq
commented at 5:30 pm on June 18, 2024:
contributor
Why this change?
#30269 describes a need for documentation improvement with the loadwallet RPC. Namely, some users have found the usage description confusing when it comes to loading wallets that are not in the normal case of being in the default wallet directory.
Change the help text to indicate that the filename (or directory) passed in to loadwallet is relative to the base wallet directory
Adds additional examples to the help page showing how to fetch a wallet within a subdirectory of the base data directory for wallets, or from an absolute path
DrahtBot
commented at 5:30 pm on June 18, 2024:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Conflicts
No conflicts as of last run.
DrahtBot added the label
Docs
on Jun 18, 2024
in
src/wallet/rpc/wallet.cpp:223
in
7325a49532outdated
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "Filename relative to the wallet directory."},
Thanks for the review. Is this description better?
0You may pass in the absolute path of your wallet directory or .dat file. Otherwise, the interpreted path will be relative to the default wallet directory.
Tried createwallet to observe that the current version creates a directory with the given name, containing wallet.dat (and wallet.dat-journal while loaded).
Suggestion: put the normal/current/simplest operation first, and also add some descriptions to command examples:
0"\nLoad regular wallet with files under wallets/foo/:\n"1+ HelpExampleCli("loadwallet", "\"foo\"") +2"\nLoad wallet using absolute path:\n"3+ HelpExampleCli("loadwallet", "\"/Users/joe/specialWallet/\"")
4"\nLoad legacy wallet.dat file directly under the wallets/ directory:\n"5+ HelpExampleCli("loadwallet", "\"legacy.dat\"")
/Users/joe/specialWallets should be changed to /Users/joe/specialWallet/ here and in the RPC example since we only load one wallet at a time and to make clear that it is a directory.
I made the change to reflect different path string depending on OS. Let me know if this is what you meant. I was also debating doing an alternative way where 2 example types are displayed, one MacOS and other Unix, so that web docs like https://developer.bitcoin.org/reference/rpc/loadwallet.html show both examples.
DrahtBot added the label
CI failed
on Jun 22, 2024
DrahtBot
commented at 3:48 am on June 22, 2024:
contributor
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.
Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
Leave a comment here, if you need help tracking down a confusing failure.
No old school Hungarian notation (pszHome -> home). (Also +const where possible).
See if char* is empty through checking first character instead of counting length of string (strlen()). Wish std::empty()had an overload for this but couldn’t find one.
absoluteSpecialWalletPath -> absolutePath (maybe absolutePathExample would be a good middle ground?), and type is fs::path all the way.
More common #preprocessor indentation.
/<name>/specialWallet/ -> /home/<name>/specialWallet/ when environment variable is nullptr.
Take from it what you want. Warning: other reviewers might disagree with me on something.
If you prefer to keep your current version and others are fine with that, I will ACK too.
git range-diff ee15876~1..ee15876 a0dffe6~1..a0dffe6
Agree that “regular” wording wasn’t needed.
am-sq force-pushed
on Jun 25, 2024
DrahtBot added the label
CI failed
on Jun 25, 2024
DrahtBot
commented at 7:54 am on June 25, 2024:
contributor
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.
Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
Leave a comment here, if you need help tracking down a confusing failure.
I don’t think the RPC documentation in the right place to inject and leak the name of the user that generated the docs. Among the obvious issues, this also makes them less deterministic.
I am sure a user can figure out what an absolute path means without having to see it in the docs.
If it was important to show this location, it can be returned by a dedicated RPC field?
Could reduce it down to only one HelpExampleRpc if one would want to reduce the number of lines.
0+"\nLoad wallet with files under wallets/foo/ via RPC:\n"1+ HelpExampleRpc("loadwallet", "\"foo\"")
2+"\nLoad wallet with files under wallets/foo/specialWallet/:\n"3+ HelpExampleCli("loadwallet", "\"foo/specialWallet/\"")
4+"\nLoad wallet using absolute path (Unix):\n"5+ HelpExampleCli("loadwallet", "\"/path/to/specialWallet/\"")
6+"\nLoad wallet using absolute path (Windows):\n"7+ HelpExampleCli("loadwallet", "\"C:\\Users\\myusername\\specialWallet\\\"")
8+"\nLoad legacy wallet.dat file directly under the wallets/ directory:\n"9+ HelpExampleCli("loadwallet", "\"legacy.dat\"")
Don’t know of a good way unfortunately. Maybe one of the other reviewers will react soon from our comment activity today.
Did a quick search for HelpExampleRpc now and there are a few other RPCs which have quite a few examples.
hodlinator approved
hodlinator
commented at 5:54 pm on June 28, 2024:
contributor
ACK69bf58dc0e25897e9fde435c9823a921590a90dc
Built and tested bitcoin-cli -regtest loadwallet.
am-sq requested review from luke-jr
on Jun 29, 2024
am-sq requested review from jonatack
on Jun 29, 2024
am-sq requested review from maflcko
on Jun 29, 2024
DrahtBot added the label
CI failed
on Aug 19, 2024
DrahtBot removed the label
CI failed
on Aug 22, 2024
BrandonOdiwuor
commented at 11:27 am on September 10, 2024:
contributor
Concept ACK
maflcko requested review from murchandamus
on Sep 10, 2024
marcofleon
commented at 3:11 pm on September 11, 2024:
contributor
ACK69bf58dc0e25897e9fde435c9823a921590a90dc
0bcli -regtest loadwallet
1error code: -1 2error message:
3loadwallet "filename" ( load_on_startup )
4 5Loads a wallet from a wallet file or directory. 6Note that all wallet command-line options used when starting bitcoind will be
7applied to the new wallet. 8 9Arguments:
101. filename (string, required) You may passin the absolute path of your wallet directory or.dat file. Otherwise, the interpreted path will be relative to the default wallet directory.112. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.1213Result:
14{ (json object)
15"name" : "str", (string) The wallet name if loaded successfully.16"warnings" : [ (json array, optional) Warning messages, if any, related to loading the wallet.17"str", (string)
18...19 ]
20}
2122Examples:
2324Load wallet with files under wallets/foo/:
25> bitcoin-cli loadwallet "foo"26> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["foo"]}'-H 'content-type: application/json' http://127.0.0.1:8332/2728Load wallet with files under wallets/foo/specialWallet/:
29> bitcoin-cli loadwallet "foo/specialWallet/"30> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["foo/specialWallet/"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3132Load wallet using absolute path (Unix):
33> bitcoin-cli loadwallet "/path/to/specialWallet/"34> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["/path/to/specialWallet/"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3536Load wallet using absolute path (Windows):
37> bitcoin-cli loadwallet "C:\Users\myusername\specialWallet\"38> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["C:\Users\myusername\specialWallet\"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3940Load legacy wallet.dat file directly under the wallets/ directory:
41> bitcoin-cli loadwallet "legacy.dat"42> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["legacy.dat"]}'-H 'content-type: application/json' http://127.0.0.1:8332/
DrahtBot requested review from BrandonOdiwuor
on Sep 11, 2024
in
src/wallet/rpc/wallet.cpp:223
in
69bf58dc0eoutdated
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "You may pass in the absolute path of your wallet directory or .dat file. Otherwise, the interpreted path will be relative to the default wallet directory."},
This seems to discuss passing in the absolute path of the .dat file. Saw the following behavior:
(regtest=1 in bitcoin.conf)
0dev@bdev01:~/bitcoin$ src/bitcoind -daemonwait
1Bitcoin Core starting
2dev@bdev01:~/bitcoin$ src/bitcoin-cli createwallet foo
3{
4"name": "foo" 5}
6dev@bdev01:~/bitcoin$ src/bitcoin-cli stop
7Bitcoin Core stopping
8dev@bdev01:~/bitcoin$ src/bitcoind -daemonwait
9Bitcoin Core starting
10dev@bdev01:~/bitcoin$ ls -l /home/dev/.bitcoin/regtest/wallets/foo/wallet.dat
11-rw-------1 dev dev 24576 Sep 1113:40/home/dev/.bitcoin/regtest/wallets/foo/wallet.dat
12dev@bdev01:~/bitcoin$ src/bitcoin-cli loadwallet "/home/dev/.bitcoin/regtest/wallets/foo/wallet.dat"13error code: -414error message:
15Wallet file verification failed. Invalid -wallet path '/home/dev/.bitcoin/regtest/wallets/foo/wallet.dat'.-wallet path should point to a directory where wallet.dat and database/log.?????????? files can be stored, a location where such a directory could be created, or (for backwards compatibility) the name of an existing data file in-walletdir ("/home/dev/.bitcoin/regtest/wallets")
hodlinator
commented at 9:54 pm on September 11, 2024:
Might be clearer like this:
0 {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "You may pass in the absolute path of your wallet directory (or .dat file for legacy wallets). Otherwise, the interpreted path will be relative to the default wallet directory."},
murchandamus
commented at 7:13 pm on September 12, 2024:
I agree with @hodlinator, and this may be a bit verbose for something that is output to the console. How about:
0 {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path of the wallet directory (or a legacy wallet’s .dat file). Takes an absolute path or a path relative to the default wallet directory."},
tdb3
commented at 5:50 pm on September 11, 2024:
contributor
ACK69bf58dc0e25897e9fde435c9823a921590a90dc
This is definitely an improvement on the existing loadwallet help.
nit: I believe the RPC page listed in the commit message is actually derived from the help output of loadwallet. Technically this PR addresses the help output, and downstream things that use it would also benefit. I don’t really see a crucial need to change the commit message though, so feel free to ignore. If you happen to change something else, it might be good to also update the commit message.
murchandamus
commented at 7:20 pm on September 12, 2024:
contributor
utACK69bf58dc0e25897e9fde435c9823a921590a90dc
Thanks for the additional examples and improving the documentation
am-sq force-pushed
on Sep 12, 2024
am-sq
commented at 9:38 pm on September 12, 2024:
contributor
This is definitely an improvement on the existing loadwallet help.
nit: I believe the RPC page listed in the commit message is actually derived from the help output of loadwallet. Technically this PR addresses the help output, and downstream things that use it would also benefit. I don’t really see a crucial need to change the commit message though, so feel free to ignore. If you happen to change something else, it might be good to also update the commit message.
Fixed the commit message!
tdb3 approved
tdb3
commented at 10:54 am on September 13, 2024:
contributor
ACKb9aded42252969cc81acf4122ca5e2d1e00ecf90
DrahtBot requested review from marcofleon
on Sep 13, 2024
DrahtBot requested review from hodlinator
on Sep 13, 2024
DrahtBot requested review from murchandamus
on Sep 13, 2024
hodlinator approved
hodlinator
commented at 1:28 pm on September 17, 2024:
contributor
re-ACKb9aded42252969cc81acf4122ca5e2d1e00ecf90
Checked changes since last ACK with git range-diff master 69bf58d b9aded4.
Adjusted commit message to not mention indirect documentation generation.
Incorporated feedback around .dat-file paths being for legacy wallets.
in
src/wallet/rpc/wallet.cpp:223
in
b9aded4225outdated
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path of the wallet directory (or a legacy wallet's .dat file). Takes an absolute path or a path relative to the default wallet directory."},
achow101
commented at 3:59 pm on September 20, 2024:
The relative path is relative to the wallet directory, not the default wallet directory. Starting with -walletdir=<dir> will change the wallet directory and specifying a wallet name in this argument will be interpreted to be relative to that walletdir.
pablomartin4btc
commented at 11:18 pm on September 26, 2024:
We have already updated<filename> to <walletname> in a few places (bitcoin-cli.cpp and wallet/rpc/utils.cpp), shouldn’t be this the case as well?
nit:
0 {"walletname", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the wallet directory (absolute or relative to the wallets directory), or a legacy wallet's .dat file (within the wallets directory). The default wallets directory is the 'wallets' folder inside the data directory, unless the `-walletdir` option is specified."},
My bad, my suggestion was more for discussion as I did it on top of @achow101’s one. The tests can be updated but I see we could be breaking things on users end if they pass named args (filename=) as in wallet_startup,py.
MarnixCroes
commented at 3:48 pm on October 18, 2024:
contributor
cACK good clarification
in
src/wallet/rpc/wallet.cpp:223
in
221296c1f0outdated
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the wallet directory (absolute or relative to the wallets directory), or a legacy wallet's .dat file (within the wallets directory). The default wallets directory is the 'wallets' folder inside the data directory, unless the `-walletdir` option is specified."},
achow101
commented at 4:39 pm on October 23, 2024:
“The default wallets directory is the ‘wallets’ folder inside the data directory, unless the -walletdir option is specified.”
This sentence is a little bit confusing as it suggests -walletdir changes the default somehow. I would rephrase this as “The wallets directory is set by the -walletdir option and defaults to the ‘wallets’ folder within the data directory.”
ralyodio
commented at 4:10 pm on November 1, 2024:
none
LGtm
murchandamus
commented at 9:03 pm on January 24, 2025:
contributor
It seems to me that this has had a number of ACKs in the past and with the open review comments being addressed could be RFM pretty quickly.
DrahtBot requested review from murchandamus
on Jan 24, 2025
am-sq force-pushed
on Feb 16, 2025
am-sq requested review from achow101
on Feb 16, 2025
am-sq requested review from MarnixCroes
on Feb 16, 2025
am-sq requested review from ralyodio
on Feb 16, 2025
am-sq requested review from adamandrews1
on Feb 16, 2025
am-sq requested review from hodlinator
on Feb 16, 2025
adamandrews1
commented at 6:33 pm on February 17, 2025:
none
utACK80e695e
hodlinator approved
hodlinator
commented at 9:49 pm on February 17, 2025:
contributor
re-ACK80e695e6f1edd1a6d9aaab0748a5b573c4492cb4
0₿ build/src/bitcoin-cli -regtest loadwallet
1error code: -1 2error message:
3loadwallet "filename" ( load_on_startup )
4 5Loads a wallet from a wallet file or directory. 6Note that all wallet command-line options used when starting bitcoind will be
7applied to the new wallet. 8 9Arguments:
101. filename (string, required) The path to the wallet directory (absolute or relative to the wallets directory), or a legacy wallet's .dat file (within the wallets directory). The wallets directory is set by the -walletdir option and defaults to the 'wallets' folder within the data directory.112. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.1213Result:
14{ (json object)
15"name" : "str", (string) The wallet name if loaded successfully.16"warnings" : [ (json array, optional) Warning messages, if any, related to loading the wallet.17"str", (string)
18...19 ]
20}
2122Examples:
2324Load wallet from the wallet dir:
25> bitcoin-cli loadwallet "walletname"26> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["walletname"]}'-H 'content-type: application/json' http://127.0.0.1:8332/2728Load wallet using absolute path (Unix):
29> bitcoin-cli loadwallet "/path/to/walletname/"30> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["/path/to/walletname/"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3132Load wallet using absolute path (Windows):
33> bitcoin-cli loadwallet "C:\Users\myusername\walletname\"34> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["C:\Users\myusername\walletname\"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3536Load legacy wallet.dat file directly under the wallets/ directory:
37> bitcoin-cli loadwallet "legacy.dat"38> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["legacy.dat"]}'-H 'content-type: application/json' http://127.0.0.1:8332/
in
src/wallet/rpc/wallet.cpp:245
in
80e695e6f1outdated
hodlinator
commented at 12:57 pm on February 19, 2025:
nit: I think “DriveLetter:” is more confusing than “C:”. This is an example, not some kind of catch-all pattern.
hodlinator
commented at 1:00 pm on February 19, 2025:
(I’m fine with the “path\to\walletname”-part though).
rkrux approved
rkrux
commented at 1:57 pm on February 18, 2025:
none
tACK80e695e6f1edd1a6d9aaab0748a5b573c4492cb4
I built and executed the help command on my mac machine, PFB the output. The PR has gone through multiple rounds of review, shared a nit but not inclined on invalidating ACKs for this.
0➜ src git:(am-sq/improve-description-loadwallet-rpc) ✗ bitcoinclireg help loadwallet
1loadwallet "filename" ( load_on_startup )
2 3Loads a wallet from a wallet file or directory. 4Note that all wallet command-line options used when starting bitcoind will be
5applied to the new wallet. 6 7Arguments:
81. filename (string, required) The path to the wallet directory (absolute or relative to the wallets directory), or a legacy wallet's .dat file (within the wallets directory). The wallets directory is set by the -walletdir option and defaults to the 'wallets' folder within the data directory. 92. load_on_startup (boolean, optional) Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged.1011Result:
12{ (json object)
13"name" : "str", (string) The wallet name if loaded successfully.14"warnings" : [ (json array, optional) Warning messages, if any, related to loading the wallet.15"str", (string)
16...17 ]
18}
1920Examples:
2122Load wallet from the wallet dir:
23> bitcoin-cli loadwallet "walletname"24> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["walletname"]}'-H 'content-type: application/json' http://127.0.0.1:8332/2526Load wallet using absolute path (Unix):
27> bitcoin-cli loadwallet "/path/to/walletname/"28> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["/path/to/walletname/"]}'-H 'content-type: application/json' http://127.0.0.1:8332/2930Load wallet using absolute path (Windows):
31> bitcoin-cli loadwallet "C:\Users\myusername\walletname\"32> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["C:\Users\myusername\walletname\"]}'-H 'content-type: application/json' http://127.0.0.1:8332/3334Load legacy wallet.dat file directly under the wallets/ directory:
35> bitcoin-cli loadwallet "legacy.dat"36> curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "loadwallet", "params": ["legacy.dat"]}'-H 'content-type: application/json' http://127.0.0.1:8332/
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.
ca6aa0b9be
in
src/wallet/rpc/wallet.cpp:223
in
80e695e6f1outdated
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the wallet directory (absolute or relative to the wallets directory), or a legacy wallet's .dat file (within the wallets directory). The wallets directory is set by the -walletdir option and defaults to the 'wallets' folder within the data directory."},
jonatack
commented at 2:15 pm on February 18, 2025:
0 {"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."},
be more clear with the distinction between the wallet directory and the wallets directory
hodlinator
commented at 3:26 pm on February 18, 2025:
Agree on double-quotes in more places giving nicer output, but would not rephrase or remove legacy wallets at this point.
0 {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the wallet directory (absolute or relative to the \"wallets\" directory), or a legacy wallet's .dat file (within the \"wallets\" directory). The \"wallets\" directory is set by the -walletdir option and defaults to the \"wallets\" folder within the data directory."},
I understand if you (PR author) don’t want to invalidate the ACKs right now.
jonatack
commented at 3:36 pm on February 18, 2025:
I think invalidating ACKs is more a consideration for critical or difficult-to-review changes.
If loading legacy wallets will be disabled in the next release, it may be worth not adding a mention here that would require attention/removal.
jonatack
commented at 3:39 pm on February 18, 2025:
Agree on double-quotes in more places giving nicer output
The suggested diff doesn’t only add double quotes but also proposes a rewrite for clarity between wallet directory and wallets directory.
There is an example pair (Cli+rpc) under Load legacy wallet.dat file directly under the wallets/ directory. Should we delete that as well?
jonatack
commented at 7:49 pm on February 18, 2025:
I think so, best avoid needing to (remember to) retouch those.
hodlinator
commented at 11:04 pm on February 18, 2025:
A weak counter-argument could be that if this change is included in the last release with wallet.dat-support, it would be nice to include it in the help text for people in the future going back in releases to recover their old wallets.
I opted to remove because
a) such users going back in releases can check nearby historical commits (not greatest / reliable user experience I realize…)
b) less need to make changes in future for a minor doc change (get reviews, etc…)
am-sq force-pushed
on Feb 18, 2025
am-sq requested review from jonatack
on Feb 18, 2025
rkrux approved
rkrux
commented at 12:51 pm on February 20, 2025:
none
ACKca6aa0b9bee3fdf355b7154a9a686a80977f2a02
DrahtBot requested review from hodlinator
on Feb 20, 2025
jonatack
commented at 6:11 pm on February 20, 2025:
maybe clearer
0 "\nLoad wallet from the -walletdir (default: \"wallets\" in the data directory):\n"
jonatack
commented at 6:18 pm on February 20, 2025:
member
ACKca6aa0b9bee3fdf355b7154a9a686a80977f2a02
in
src/wallet/rpc/wallet.cpp:223
in
ca6aa0b9be
219@@ -220,7 +220,7 @@ static RPCHelpMan loadwallet()
220 "\nNote that all wallet command-line options used when starting bitcoind will be"
221 "\napplied to the new wallet.\n",
222 {
223- {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The wallet directory or .dat file."},
224+ {"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."},
jonatack
commented at 6:19 pm on February 20, 2025:
0 {"filename", RPCArg::Type::STR, RPCArg::Optional::NO, "The path to the directory of the wallet to be loaded, either relative to the \"wallets\" directory or absolute. The \"wallets\" directory is set by the -walletdir option and defaults to the \"wallets\" folder within the data directory."},
The relative path seems more user-friendly, as unloading a wallet that was loaded with an absolute path might require something like
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2025-05-29 06:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me