From 96d28e85638e71a3f2b9ba8521864d9698832a87 Mon Sep 17 00:00:00 2001 From: Marcin Czenko Date: Mon, 17 Mar 2025 16:53:37 +0100 Subject: [PATCH] adds "==" operator to torrent manifest --- codex/bittorrent/manifest/manifest.nim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex/bittorrent/manifest/manifest.nim b/codex/bittorrent/manifest/manifest.nim index 960fc38a..7e9b1148 100644 --- a/codex/bittorrent/manifest/manifest.nim +++ b/codex/bittorrent/manifest/manifest.nim @@ -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 =