@@ -290,8 +290,6 @@ RPCHelpMan lockunspent()
290290
291291 LOCK (pwallet->cs_wallet );
292292
293- RPCTypeCheckArgument (request.params [0 ], UniValue::VBOOL);
294-
295293 bool fUnlock = request.params [0 ].get_bool ();
296294
297295 const bool persistent{request.params [2 ].isNull () ? false : request.params [2 ].get_bool ()};
@@ -304,9 +302,7 @@ RPCHelpMan lockunspent()
304302 return true ;
305303 }
306304
307- RPCTypeCheckArgument (request.params [1 ], UniValue::VARR);
308-
309- const UniValue& output_params = request.params [1 ];
305+ const UniValue& output_params = request.params [1 ].get_array ();
310306
311307 // Create and validate the COutPoints first.
312308
@@ -566,19 +562,16 @@ RPCHelpMan listunspent()
566562
567563 int nMinDepth = 1 ;
568564 if (!request.params [0 ].isNull ()) {
569- RPCTypeCheckArgument (request.params [0 ], UniValue::VNUM);
570565 nMinDepth = request.params [0 ].getInt <int >();
571566 }
572567
573568 int nMaxDepth = 9999999 ;
574569 if (!request.params [1 ].isNull ()) {
575- RPCTypeCheckArgument (request.params [1 ], UniValue::VNUM);
576570 nMaxDepth = request.params [1 ].getInt <int >();
577571 }
578572
579573 std::set<CTxDestination> destinations;
580574 if (!request.params [2 ].isNull ()) {
581- RPCTypeCheckArgument (request.params [2 ], UniValue::VARR);
582575 UniValue inputs = request.params [2 ].get_array ();
583576 for (unsigned int idx = 0 ; idx < inputs.size (); idx++) {
584577 const UniValue& input = inputs[idx];
@@ -594,7 +587,6 @@ RPCHelpMan listunspent()
594587
595588 bool include_unsafe = true ;
596589 if (!request.params [3 ].isNull ()) {
597- RPCTypeCheckArgument (request.params [3 ], UniValue::VBOOL);
598590 include_unsafe = request.params [3 ].get_bool ();
599591 }
600592
0 commit comments