mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
eth/downloader: simplify disableSnap
This commit is contained in:
parent
8529acce90
commit
e9a885a508
1 changed files with 2 additions and 7 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue