grin/servers
hashmap 466ce986a6
Use round robin for peer selection in body sync
We select a peer to ask a block randomly. Peer's send channel has
capacity 10. If we need too many blocks we limit number of blocks to asks as a number of peers
* 10, which means that there is some probability (pretty high) that we
will overflow send buffer capacity.
This fix freezes a peer list (which gives also some performance boost)
and create a cycle iteraror to equally distribute requests among the
peers.
There is a risk that a peer may be disconnected while we are sending a
request to the chanel, but stricltly speaking it was possible in the old
code too, perhaps with a lower probability.
Fixes #1748
2018-10-16 12:14:17 +02:00
..
src Use round robin for peer selection in body sync 2018-10-16 12:14:17 +02:00
tests small improvement on the servers test (#1737) 2018-10-14 20:13:49 +08:00
Cargo.toml update cargo versioning 2018-10-15 10:34:33 +00:00