aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/hash.h')
-rw-r--r--src/crypto/hash.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crypto/hash.h b/src/crypto/hash.h
index 8ea626314..274907076 100644
--- a/src/crypto/hash.h
+++ b/src/crypto/hash.h
@@ -101,6 +101,9 @@ namespace crypto {
constexpr static crypto::hash null_hash = {};
constexpr static crypto::hash8 null_hash8 = {};
+
+ inline bool operator<(const hash &lhs, const hash &rhs) noexcept { return memcmp(&lhs, &rhs, sizeof(hash)) < 0; }
+ inline bool operator>(const hash &lhs, const hash &rhs) noexcept { return rhs < lhs; }
}
CRYPTO_MAKE_HASHABLE(hash)