Open juhanak opened 8 years ago
Actually this shouldn't be handled in thaliPeerPool because the peer pool doesn't really know anything about the semantics of an event. It would make more sense to put this into the notification code so that we essentially delay calling enqueue for a random period of time. Alternatively we could put a delay into the notification action itself so that it uses a time out before it makes a HTTP request.
When a new peer appears and starts to advertise itself, there should be a random delay before clients try to connect to it in order to avoid collisions. Otherwise all clients try to connect to the same peer at the same time. This can be implemented in thaliPeerPool.