File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2382,9 +2382,7 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
23822382 return NullUniValue;
23832383 }
23842384
2385- if (request.fHelp || request.params .size () != 0 )
2386- throw std::runtime_error (
2387- RPCHelpMan{" getwalletinfo" ,
2385+ const RPCHelpMan help{" getwalletinfo" ,
23882386 " Returns an object containing various wallet state info.\n " ,
23892387 {},
23902388 RPCResult{
@@ -2408,7 +2406,11 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
24082406 HelpExampleCli (" getwalletinfo" , " " )
24092407 + HelpExampleRpc (" getwalletinfo" , " " )
24102408 },
2411- }.ToString ());
2409+ };
2410+
2411+ if (request.fHelp || !help.IsValidNumArgs (request.params .size ())) {
2412+ throw std::runtime_error (help.ToString ());
2413+ }
24122414
24132415 // Make sure the results are valid at least up to the most recent block
24142416 // the user could have gotten from another RPC command prior to now
You can’t perform that action at this time.
0 commit comments