Just documentation clarifications from #20448
RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC request and wallet_name parameter specify a wallet #20462
pull luke-jr wants to merge 1 commits into bitcoin:master from luke-jr:unloadwallet_namematch_pt1 changing 2 files +4 −3-
luke-jr commented at 2:07 PM on November 23, 2020: member
-
MarcoFalke commented at 2:13 PM on November 23, 2020: member
cr ACK 81162ec41e5ee2ce06829dea8865925c1155cc68
-
in src/wallet/rpcwallet.cpp:2795 in 81162ec41e outdated
2791 | @@ -2792,7 +2792,7 @@ static RPCHelpMan unloadwallet() 2792 | "Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument.\n" 2793 | "Specifying the wallet name on a wallet endpoint is invalid.", 2794 | { 2795 | - {"wallet_name", RPCArg::Type::STR, /* default */ "the wallet name from the RPC request", "The name of the wallet to unload."}, 2796 | + {"wallet_name", RPCArg::Type::STR, /* default */ "the wallet name from the RPC request", "The name of the wallet to unload. Must be provided in the RPC request or this parameter (but not both)."},
promag commented at 2:16 PM on November 23, 2020:RPC request or RPC endpoint?
promag commented at 2:17 PM on November 23, 2020: memberRPC description kind of says the same already:
Unloads the wallet referenced by the request endpoint otherwise unloads the wallet specified in the argument. Specifying the wallet name on a wallet endpoint is invalid.ACK improving current error.
in test/functional/wallet_multiwallet.py:358 in 81162ec41e outdated
354 | @@ -355,7 +355,7 @@ def wallet_file(name): 355 | assert_raises_rpc_error(-1, "JSON value is not a string as expected", self.nodes[0].unloadwallet) 356 | assert_raises_rpc_error(-18, "Requested wallet does not exist or is not loaded", self.nodes[0].unloadwallet, "dummy") 357 | assert_raises_rpc_error(-18, "Requested wallet does not exist or is not loaded", node.get_wallet_rpc("dummy").unloadwallet) 358 | - assert_raises_rpc_error(-8, "Cannot unload the requested wallet", w1.unloadwallet, "w2"), 359 | + assert_raises_rpc_error(-8, "Both the RPC request wallet and wallet_name parameter were provided (only one allowed)", w1.unloadwallet, "w2"),
jonatack commented at 2:46 PM on November 23, 2020:Please include a test with the same wallet name, e.g.
w1.unloadwallet, w1.getwalletinfo()["walletname"]DrahtBot added the label RPC/REST/ZMQ on Nov 23, 2020DrahtBot added the label Wallet on Nov 23, 2020luke-jr force-pushed on Nov 23, 2020jonatack commented at 7:22 PM on November 23, 2020: contributorACK e8303a08e7226cd9640001b9b9d50afd8533dc8e
DrahtBot commented at 9:40 PM on November 23, 2020: contributor<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #20448 (RPC/Wallet: unloadwallet: Allow specifying wallet_name param matching RPC request, and document behaviour by luke-jr)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
DrahtBot cross-referenced this on Nov 23, 2020 from issue RPC/Wallet: unloadwallet: Allow specifying wallet_name param matching RPC endpoint wallet by luke-jrRPC/Wallet: unloadwallet: Clarify docs/error when both the RPC endpoint and wallet_name parameter specify a wallet b1f59d55d9luke-jr force-pushed on Nov 24, 2020luke-jr commented at 5:32 AM on November 24, 2020: member...also used "endpoint" in error message and commit message...
MarcoFalke commented at 7:07 AM on November 24, 2020: memberreview ACK b1f59d55d920d2b35269b474762f94fec87bfb16
jonatack commented at 10:43 AM on November 24, 2020: contributorre-ACK b1f59d55d920d2b35269b474762f94fec87bfb16 per
git diff e8303a0 b1f59d5MarcoFalke added the label Needs backport (0.21) on Nov 24, 2020MarcoFalke removed the label Needs backport (0.21) on Nov 24, 2020MarcoFalke cross-referenced this on Nov 24, 2020 from issue [backport] RPC: unloadwallet: Clarify docs/error when both the RPC endpoint and wallet_name parameter specify a wallet by MarcoFalkeMarcoFalke merged this on Nov 24, 2020MarcoFalke closed this on Nov 24, 2020MarcoFalke added the label Docs on Nov 24, 2020MarcoFalke commented at 11:09 AM on November 24, 2020: memberBackported in #20475
sidhujag referenced this in commit 94ee716b40 on Nov 24, 2020MarcoFalke referenced this in commit 3fae2f95f1 on Nov 24, 2020bitcoin locked this on Feb 15, 2022ContributorsLabels
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: 2026-05-20 06:54 UTC