| 975 | } |
| 976 | |
| 977 | CoinStatsHashType ParseHashType(std::string_view hash_type_input) |
| 978 | { |
| 979 | if (hash_type_input == "hash_serialized_3") { |
| 980 | return CoinStatsHashType::HASH_SERIALIZED; |
| 981 | } else if (hash_type_input == "muhash") { |
| 982 | return CoinStatsHashType::MUHASH; |
| 983 | } else if (hash_type_input == "none") { |
| 984 | return CoinStatsHashType::NONE; |
| 985 | } else { |
| 986 | throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("'%s' is not a valid hash_type", hash_type_input)); |
| 987 | } |
| 988 | } |
| 989 | |
| 990 | /** |
| 991 | * Calculate statistics about the unspent transaction output set |
no test coverage detected