eth/downloader: simplify disableSnap

This commit is contained in:
Felix Lange 2025-12-08 19:39:41 +01:00
parent 8529acce90
commit e9a885a508

View file

@ -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()
}