mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p/simulations: ignore control events in snapshot load
This commit is contained in:
parent
51ae79551d
commit
f34119d7e0
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue