MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / checkObject

Method checkObject

src/univalue/lib/univalue.cpp:167–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167bool UniValue::checkObject(const std::map<std::string,UniValue::VType>& t) const
168{
169 if (typ != VOBJ) {
170 return false;
171 }
172
173 for (const auto& object: t) {
174 size_t idx = 0;
175 if (!findKey(object.first, idx)) {
176 return false;
177 }
178
179 if (values.at(idx).getType() != object.second) {
180 return false;
181 }
182 }
183
184 return true;
185}
186
187const UniValue& UniValue::operator[](const std::string& key) const
188{

Callers 2

MutateTxSignFunction · 0.80
univalue_objectFunction · 0.80

Calls 2

getTypeMethod · 0.80
atMethod · 0.45

Tested by 1

univalue_objectFunction · 0.64