diff --git a/eth/downloader/syncmode.go b/eth/downloader/syncmode.go index 04129b7775..4947214389 100644 --- a/eth/downloader/syncmode.go +++ b/eth/downloader/syncmode.go @@ -103,14 +103,9 @@ func (m *moder) getMode() ethconfig.SyncMode { return ethconfig.FullSync } -// disableSnap disables the snap sync mode, usually it's called after a successful -// snap sync. +// disableSnap disables the snap sync mode, usually it's called after a successful snap sync. func (m *moder) disableSnap() { m.lock.Lock() - defer m.lock.Unlock() - - if m.mode == ethconfig.FullSync { - return - } m.mode = ethconfig.FullSync + m.lock.Unlock() }