rpc: Run type check against RPCArgs

This commit is contained in:
MarcoFalke
2022-12-12 14:30:14 +01:00
parent faf96721a6
commit fa9f6d7bcd
12 changed files with 83 additions and 153 deletions

View File

@@ -568,8 +568,6 @@ static RPCHelpMan upgradewallet()
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
if (!pwallet) return UniValue::VNULL;
RPCTypeCheck(request.params, {UniValue::VNUM}, true);
EnsureWalletIsUnlocked(*pwallet);
int version = 0;
@@ -637,8 +635,6 @@ RPCHelpMan simulaterawtransaction()
if (!rpc_wallet) return UniValue::VNULL;
const CWallet& wallet = *rpc_wallet;
RPCTypeCheck(request.params, {UniValue::VARR, UniValue::VOBJ}, true);
LOCK(wallet.cs_wallet);
UniValue include_watchonly(UniValue::VNULL);