aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/server.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-18 16:57:48 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-02-22 17:39:51 -0500
commit8acd25d8548d91f1e6c1d7c6fa3528c09da6ff80 (patch)
tree10939681a7077b6bb585b202032bdde066653089 /src/rpc/server.h
parente4ffcacc2187d3419c8ea12b82fb06d82d8751d2 (diff)
rpc: Allow typeAny in RPCTypeCheck
Diffstat (limited to 'src/rpc/server.h')
-rw-r--r--src/rpc/server.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/server.h b/src/rpc/server.h
index 075940cb90..703c105be0 100644
--- a/src/rpc/server.h
+++ b/src/rpc/server.h
@@ -30,7 +30,7 @@ namespace RPCServer
/** Wrapper for UniValue::VType, which includes typeAny:
* Used to denote don't care type. Only used by RPCTypeCheckObj */
struct UniValueType {
- explicit UniValueType(UniValue::VType _type) : typeAny(false), type(_type) {}
+ UniValueType(UniValue::VType _type) : typeAny(false), type(_type) {}
UniValueType() : typeAny(true) {}
bool typeAny;
UniValue::VType type;
@@ -69,12 +69,12 @@ bool RPCIsInWarmup(std::string *outStatus);
* the right number of arguments are passed, just that any passed are the correct type.
*/
void RPCTypeCheck(const UniValue& params,
- const std::list<UniValue::VType>& typesExpected, bool fAllowNull=false);
+ const std::list<UniValueType>& typesExpected, bool fAllowNull=false);
/**
* Type-check one argument; throws JSONRPCError if wrong type given.
*/
-void RPCTypeCheckArgument(const UniValue& value, UniValue::VType typeExpected);
+void RPCTypeCheckArgument(const UniValue& value, const UniValueType& typeExpected);
/*
Check for expected keys/value types in an Object.