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

Function ParseHashType

src/rpc/blockchain.cpp:977–988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

975}
976
977CoinStatsHashType 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

Callers 1

gettxoutsetinfoFunction · 0.85

Calls 1

JSONRPCErrorFunction · 0.85

Tested by

no test coverage detected