MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RPCConvertValues

Function RPCConvertValues

src/rpc/client.cpp:223–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
224{
225 UniValue params(UniValue::VARR);
226
227 for (unsigned int idx = 0; idx < strParams.size(); idx++) {
228 const std::string& strVal = strParams[idx];
229
230 if (!rpcCvtTable.convert(strMethod, idx)) {
231 // insert string value directly
232 params.push_back(strVal);
233 } else {
234 // parse string as JSON, insert bool/number/object/etc. value
235 params.push_back(ParseNonRFCJSONValue(strVal));
236 }
237 }
238
239 return params;
240}
241
242UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<std::string> &strParams)
243{

Callers 4

PrepareRequestMethod · 0.85
CallRPCFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
RPCParseCommandLineMethod · 0.85

Calls 4

ParseNonRFCJSONValueFunction · 0.85
convertMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by 2

CallRPCFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68