aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/wallet.cpp
diff options
context:
space:
mode:
authorAva Chow <github@achow101.com>2024-06-04 20:11:59 -0400
committerAva Chow <github@achow101.com>2024-06-04 20:11:59 -0400
commit09fe1435d9cae5d32fa4e24042d7a862b7c7bf22 (patch)
tree7d73ca8ae4772f27d59b6420fb841a7eee440ee9 /src/wallet/rpc/wallet.cpp
parent56ea8ed3d325f42ac501cbbf536c2c642366e743 (diff)
parentfa3169b0732d7eb4b9166e7ecc6b7cfb669a9b54 (diff)
downloadbitcoin-09fe1435d9cae5d32fa4e24042d7a862b7c7bf22.tar.xz
Merge bitcoin/bitcoin#29997: rpc: Remove index-based Arg accessor
fa3169b0732d7eb4b9166e7ecc6b7cfb669a9b54 rpc: Remove index-based Arg accessor (MarcoFalke) Pull request description: The index-based Arg accessor is redundant with the name-based one. It does not provide any benefit to the code reader, or otherwise, so remove it. ACKs for top commit: stickies-v: re-ACK fa3169b0732d7eb4b9166e7ecc6b7cfb669a9b54, addressed doc nits achow101: ACK fa3169b0732d7eb4b9166e7ecc6b7cfb669a9b54 ryanofsky: Code review ACK fa3169b0732d7eb4b9166e7ecc6b7cfb669a9b54. One changes since last review are some documentation improvements Tree-SHA512: f9da1c049dbf38c3b47a8caf8d24d195c2d4b88c7ec45a9ccfb78f1e39f29cb86869f84b308f6e49856b074c06604ab634c90eb89c9c93d2a8169e070aa1bd40
Diffstat (limited to 'src/wallet/rpc/wallet.cpp')
-rw-r--r--src/wallet/rpc/wallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index 68331bf85f..8c218ad766 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -395,7 +395,7 @@ static RPCHelpMan createwallet()
if (!request.params[4].isNull() && request.params[4].get_bool()) {
flags |= WALLET_FLAG_AVOID_REUSE;
}
- if (self.Arg<bool>(5)) {
+ if (self.Arg<bool>("descriptors")) {
#ifndef USE_SQLITE
throw JSONRPCError(RPC_WALLET_ERROR, "Compiled without sqlite support (required for descriptor wallets)");
#endif
@@ -489,7 +489,7 @@ static RPCHelpMan unloadwallet()
// Release the "main" shared pointer and prevent further notifications.
// Note that any attempt to load the same wallet would fail until the wallet
// is destroyed (see CheckUniqueFileid).
- std::optional<bool> load_on_start{self.MaybeArg<bool>(1)};
+ std::optional<bool> load_on_start{self.MaybeArg<bool>("load_on_startup")};
if (!RemoveWallet(context, wallet, load_on_start, warnings)) {
throw JSONRPCError(RPC_MISC_ERROR, "Requested wallet already unloaded");
}