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 {
|
for {
|
||||||
select {
|
select {
|
||||||
case e := <-events:
|
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.
|
// Detect only connection events.
|
||||||
if e.Type != EventTypeConn {
|
if e.Type != EventTypeConn {
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue