rpc: gettxoutsetinfo rejects hash_serialized_2 for specific height

This commit is contained in:
Fabian Jahr
2021-03-04 01:37:50 +01:00
parent 23fe50436b
commit 5f96d7d22d
2 changed files with 14 additions and 0 deletions

View File

@@ -1168,6 +1168,10 @@ static RPCHelpMan gettxoutsetinfo()
throw JSONRPCError(RPC_INVALID_PARAMETER, "Querying specific block heights requires coinstatsindex");
}
if (stats.m_hash_type == CoinStatsHashType::HASH_SERIALIZED) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "hash_serialized_2 hash type cannot be queried for a specific block");
}
pindex = ParseHashOrHeight(request.params[1], chainman);
}