| 81 | } |
| 82 | |
| 83 | int 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 | |
| 98 | CAmount AmountFromValue(const UniValue& value, int decimals) |
| 99 | { |
no test coverage detected