aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-07-14 10:45:08 +0200
committerMacroFake <falke.marco@gmail.com>2022-07-14 11:56:13 +0200
commitfa3a9a1e8d9b6dffda772e97c279f3c0af6813f9 (patch)
tree28e486e5b4ee3e25100e146ddae3928cce4033e8 /src/wallet/rpc
parent062b9db0ccb6af8bfbaa2b29132408cda9991b40 (diff)
downloadbitcoin-fa3a9a1e8d9b6dffda772e97c279f3c0af6813f9.tar.xz
rpc: Select int-UniValue constructor for enum value in upgradewallet RPC
UniValue does not have a constructor for enum values, however the compiler will decay the enum into an int and select that constructor. Avoid this compiler magic and clarify the code by explicitly selecting the int-constructor. This is needed for the next commit.
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r--src/wallet/rpc/wallet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index 4c44c333a6..be1b6de7ac 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -532,7 +532,7 @@ static RPCHelpMan upgradewallet()
"\nUpgrade the wallet. Upgrades to the latest version if no version number is specified.\n"
"New keys may be generated and a new wallet backup will need to be made.",
{
- {"version", RPCArg::Type::NUM, RPCArg::Default{FEATURE_LATEST}, "The version number to upgrade to. Default is the latest wallet version."}
+ {"version", RPCArg::Type::NUM, RPCArg::Default{int{FEATURE_LATEST}}, "The version number to upgrade to. Default is the latest wallet version."}
},
RPCResult{
RPCResult::Type::OBJ, "", "",