p2p/simulations: ignore control events in snapshot load

This commit is contained in:
Janos Guljas 2018-12-03 14:57:19 +01:00
parent 51ae79551d
commit f34119d7e0

View file

@ -754,6 +754,11 @@ func (net *Network) Load(snap *Snapshot) error {
for {
select {
case e := <-events:
// Ignore control events as they do not represent
// connect or disconnect (Up) state change.
if e.Control {
continue
}
// Detect only connection events.
if e.Type != EventTypeConn {
continue