From b98b30bcb8e95d7aa5919c4fce140c863f2de88d Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 26 Sep 2023 19:33:18 +0800 Subject: [PATCH] eth: inline the function --- eth/handler.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/eth/handler.go b/eth/handler.go index 3ac9ae7a49..832d035cf6 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -179,13 +179,8 @@ func newHandler(config *handlerConfig) (*handler, error) { log.Info("Enabled snap sync", "head", head.Number, "hash", head.Hash()) } } - // If the sync succeeds, mark the local node as synced and enable all features - // with state synchronization requirements. - success := func() { - h.enableSyncedFeatures() - } // Construct the downloader (long sync) - h.downloader = downloader.New(config.Database, h.eventMux, h.chain, nil, h.removePeer, success) + h.downloader = downloader.New(config.Database, h.eventMux, h.chain, nil, h.removePeer, h.enableSyncedFeatures) if ttd := h.chain.Config().TerminalTotalDifficulty; ttd != nil { if h.chain.Config().TerminalTotalDifficultyPassed { log.Info("Chain post-merge, sync via beacon client")