Skip to content

Commit 0e38707

Browse files
committed
fix: [#1358] revert Hash impl for Swarm
To fix broken tests. This implementation will kept for now. I think it's only used for testing and I'm planning to remvoe all integration tests becuase now web have unit tests covering the same functionality.
1 parent c9a893c commit 0e38707

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/torrent-repository/src/swarm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ impl Debug for Swarm {
3636

3737
impl Hash for Swarm {
3838
fn hash<H: Hasher>(&self, state: &mut H) {
39-
self.info_hash.hash(state);
39+
self.peers.hash(state);
40+
self.metadata.hash(state);
4041
}
4142
}
4243

4344
impl PartialEq for Swarm {
4445
fn eq(&self, other: &Self) -> bool {
45-
self.info_hash == other.info_hash
46+
self.peers == other.peers && self.metadata == other.metadata
4647
}
4748
}
4849

0 commit comments

Comments
 (0)