MCPcopy Create free account
hub / github.com/ElementsProject/elements / ParseHashType

Function ParseHashType

src/rpc/blockchain.cpp:1291–1302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1289}
1290
1291CoinStatsHashType ParseHashType(const std::string& hash_type_input)
1292{
1293 if (hash_type_input == "hash_serialized_2") {
1294 return CoinStatsHashType::HASH_SERIALIZED;
1295 } else if (hash_type_input == "muhash") {
1296 return CoinStatsHashType::MUHASH;
1297 } else if (hash_type_input == "none") {
1298 return CoinStatsHashType::NONE;
1299 } else {
1300 throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("'%s' is not a valid hash_type", hash_type_input));
1301 }
1302}
1303
1304static RPCHelpMan gettxoutsetinfo()
1305{

Callers 1

gettxoutsetinfoFunction · 0.85

Calls 1

JSONRPCErrorFunction · 0.85

Tested by

no test coverage detected