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)
2382
2382
return NullUniValue;
2383
2383
}
2384
2384
2385
- if (request.fHelp || request.params .size () != 0 )
2386
- throw std::runtime_error (
2387
- RPCHelpMan{" getwalletinfo" ,
2385
+ const RPCHelpMan help{" getwalletinfo" ,
2388
2386
" Returns an object containing various wallet state info.\n " ,
2389
2387
{},
2390
2388
RPCResult{
@@ -2408,7 +2406,11 @@ static UniValue getwalletinfo(const JSONRPCRequest& request)
2408
2406
HelpExampleCli (" getwalletinfo" , " " )
2409
2407
+ HelpExampleRpc (" getwalletinfo" , " " )
2410
2408
},
2411
- }.ToString ());
2409
+ };
2410
+
2411
+ if (request.fHelp || !help.IsValidNumArgs (request.params .size ())) {
2412
+ throw std::runtime_error (help.ToString ());
2413
+ }
2412
2414
2413
2415
// Make sure the results are valid at least up to the most recent block
2414
2416
// the user could have gotten from another RPC command prior to now
You can’t perform that action at this time.
0 commit comments