From e9a885a508ca58f1611f432b49b4c2df9ef4f09f Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 8 Dec 2025 19:39:41 +0100 Subject: [PATCH] eth/downloader: simplify disableSnap --- eth/downloader/syncmode.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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() }