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

Function ParseVerbosity

src/rpc/util.cpp:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83int ParseVerbosity(const UniValue& arg, int default_verbosity, bool allow_bool)
84{
85 if (!arg.isNull()) {
86 if (arg.isBool()) {
87 if (!allow_bool) {
88 throw JSONRPCError(RPC_TYPE_ERROR, "Verbosity was boolean but only integer allowed");
89 }
90 return arg.get_bool(); // true = 1
91 } else {
92 return arg.getInt<int>();
93 }
94 }
95 return default_verbosity;
96}
97
98CAmount AmountFromValue(const UniValue& value, int decimals)
99{

Callers 3

getorphantxsFunction · 0.85
getrawtransactionFunction · 0.85
getblockFunction · 0.85

Calls 4

JSONRPCErrorFunction · 0.85
isNullMethod · 0.80
isBoolMethod · 0.80
get_boolMethod · 0.80

Tested by

no test coverage detected