I don't like skipping type checks, especially when there is a schema now. The schema or the server should take care of all of this, not each rpc method by itself.
Can you drop this?
diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp
index 792023d..85e990e 100644
--- a/src/rpc/mempool.cpp
+++ b/src/rpc/mempool.cpp
@@ -1301,4 +1301,3 @@ static RPCMethod getorphantxs()
{
- {"verbosity", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for an array of txids (may contain duplicates), 1 for an array of objects with tx details, and 2 for details from (1) and tx hex",
- RPCArgOptions{.skip_type_check = true}},
+ {"verbosity", RPCArg::Type::NUM, RPCArg::Default{0}, "0 for an array of txids (may contain duplicates), 1 for an array of objects with tx details, and 2 for details from (1) and tx hex"},
},
@@ -1336,3 +1335,3 @@ static RPCMethod getorphantxs()
- int verbosity{ParseVerbosity(request.params[0], /*default_verbosity=*/0, /*allow_bool=*/false)};
+ int verbosity{self.Arg<int>("verbosity")};
diff --git a/test/functional/rpc_orphans.py b/test/functional/rpc_orphans.py
index 6addb58..2aeed02 100755
--- a/test/functional/rpc_orphans.py
+++ b/test/functional/rpc_orphans.py
@@ -147,4 +147,4 @@ class OrphanRPCsTest(BitcoinTestFramework):
node = self.nodes[0]
- assert_raises_rpc_error(-3, "Verbosity was boolean but only integer allowed", node.getorphantxs, verbosity=True)
- assert_raises_rpc_error(-3, "Verbosity was boolean but only integer allowed", node.getorphantxs, verbosity=False)
+ assert_raises_rpc_error(-3, "type boolean is not of expected type number", node.getorphantxs, verbosity=True)
+ assert_raises_rpc_error(-3, "type boolean is not of expected type number", node.getorphantxs, verbosity=False)
help_output = node.help()