Add strict flag to RPCTypeCheckObj

Strict flag forces type check on all object keys.
This commit is contained in:
João Barbosa
2016-03-30 00:59:29 +01:00
committed by lateminer
parent b460adbab0
commit 94c2d82643
2 changed files with 15 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ void RPCTypeCheck(const UniValue& params,
Use like: RPCTypeCheckObj(object, boost::assign::map_list_of("name", str_type)("value", int_type));
*/
void RPCTypeCheckObj(const UniValue& o,
const std::map<std::string, UniValue::VType>& typesExpected, bool fAllowNull=false);
const std::map<std::string, UniValue::VType>& typesExpected, bool fAllowNull=false, bool fStrict=false);
/** Opaque base class for timers returned by NewTimerFunc.
* This provides no methods at the moment, but makes sure that delete