Skip to content

Commit

Permalink
perf(p2p): reduce traffic of p2p calls
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Feb 18, 2018
1 parent 8e81bbc commit cd6d0a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/background/bt/spider.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ class Spider extends Emiter {
}
for(const address of this.table.nodes)
{
if(parseInt(Math.random() * 5) !== 1)
continue;

this.send(message, address)
}
}
Expand Down

0 comments on commit cd6d0a2

Please sign in to comment.