Skip to content

Commit

Permalink
derp
Browse files Browse the repository at this point in the history
  • Loading branch information
roks0n committed Jul 24, 2019
1 parent ed38381 commit 218e567
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Crawler {
version: 'no-version'
}
}
this.sampleSize = sampleSize

this.peers = new Peers()
}
Expand Down Expand Up @@ -97,7 +98,7 @@ class Crawler {
.map(x => ({ x, r: Math.random() }))
.sort((a, b) => a.r - b.r)
.map(a => a.x)
.slice(0, 10)
.slice(0, this.sampleSize)
.filter(a => a.ip !== peer.ip)
.map((peer) => {
this.samplePeers[peer.ip] = NOT_VISITED
Expand Down

0 comments on commit 218e567

Please sign in to comment.