adds "==" operator to torrent manifest

This commit is contained in:
Marcin Czenko 2025-03-17 16:53:37 +01:00
parent 5846fbce70
commit 96d28e8563
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0

View File

@ -34,6 +34,9 @@ func `==`*(a: BitTorrentInfo, b: BitTorrentInfo): bool =
a.length == b.length and a.pieceLength == b.pieceLength and a.pieces == b.pieces and
a.name == b.name
func `==`*(a: BitTorrentManifest, b: BitTorrentManifest): bool =
a.info == b.info and a.codexManifestCid == b.codexManifestCid
proc newBitTorrentManifest*(
info: BitTorrentInfo, codexManifestCid: Cid
): BitTorrentManifest =