From f34119d7e053ff09b894e60efd0ea0c1a3a6577d Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Mon, 3 Dec 2018 14:57:19 +0100 Subject: [PATCH] p2p/simulations: ignore control events in snapshot load --- p2p/simulations/network.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/p2p/simulations/network.go b/p2p/simulations/network.go index 1edea152a1..a020385ffe 100644 --- a/p2p/simulations/network.go +++ b/p2p/simulations/network.go @@ -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