perf(p2p): reduce traffic of p2p calls

This commit is contained in:
Alexey Kasyanchuk 2018-02-18 12:49:32 +03:00
parent 64ab97127a
commit d011d6ed82

View File

@ -84,6 +84,9 @@ class Spider extends Emiter {
} }
for(const address of this.table.nodes) for(const address of this.table.nodes)
{ {
if(parseInt(Math.random() * 5) !== 1)
continue;
this.send(message, address) this.send(message, address)
} }
} }