mirror of
https://github.com/logos-storage/nim-mysticeti.git
synced 2026-01-07 16:13:11 +00:00
10 lines
236 B
Nim
10 lines
236 B
Nim
import std/hashes
|
|
|
|
type MockHash* = distinct hashes.Hash
|
|
|
|
func hash*(_: type MockHash, bytes: openArray[byte]): MockHash =
|
|
MockHash(bytes.hash)
|
|
|
|
func `==`*(a, b: MockHash): bool {.borrow.}
|
|
func `$`*(hash: MockHash): string {.borrow.}
|