Skip to content

Commit fa3a9a1

Browse files
author
MacroFake
committed
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.
1 parent 062b9db commit fa3a9a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/rpc/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static RPCHelpMan upgradewallet()
532532
"\nUpgrade the wallet. Upgrades to the latest version if no version number is specified.\n"
533533
"New keys may be generated and a new wallet backup will need to be made.",
534534
{
535-
{"version", RPCArg::Type::NUM, RPCArg::Default{FEATURE_LATEST}, "The version number to upgrade to. Default is the latest wallet version."}
535+
{"version", RPCArg::Type::NUM, RPCArg::Default{int{FEATURE_LATEST}}, "The version number to upgrade to. Default is the latest wallet version."}
536536
},
537537
RPCResult{
538538
RPCResult::Type::OBJ, "", "",

0 commit comments

Comments
 (0)