Better type checking for Merkle root hashes

This commit is contained in:
SChernykh
2023-12-23 10:17:49 +01:00
parent c4153a9a2a
commit 3c510598fa
10 changed files with 42 additions and 24 deletions
+9
View File
@@ -378,6 +378,15 @@ struct hash<p2pool::hash>
}
};
template<>
struct hash<p2pool::root_hash>
{
FORCEINLINE size_t operator()(const p2pool::root_hash& value) const noexcept
{
return hash_bytes(value.h, p2pool::HASH_SIZE);
}
};
template<size_t N>
struct hash<std::array<uint8_t, N>>
{