Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: dont use peer ids in sets (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun authored and vasco-santos committed Dec 12, 2019
1 parent a94f4d4 commit e12e540
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/query/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Path {

// The paths must be disjoint, meaning that no two paths in the Query may
// traverse the same peer
if (this.run.peersSeen.has(peer)) {
if (this.run.peersSeen.has(peer.toB58String())) {
return
}

Expand Down
6 changes: 3 additions & 3 deletions src/query/workerQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class WorkerQueue {

// The paths must be disjoint, meaning that no two paths in the Query may
// traverse the same peer
if (this.run.peersSeen.has(peer)) {
if (this.run.peersSeen.has(peer.toB58String())) {
return
}

Expand Down Expand Up @@ -158,10 +158,10 @@ class WorkerQueue {
}

// Check if another path has queried this peer in the mean time
if (this.run.peersSeen.has(peer)) {
if (this.run.peersSeen.has(peer.toB58String())) {
return
}
this.run.peersSeen.add(peer)
this.run.peersSeen.add(peer.toB58String())

// Execute the query on the next peer
this.log('queue:work')
Expand Down

0 comments on commit e12e540

Please sign in to comment.