Skip to content

Commit

Permalink
eth: inline the function
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 committed Sep 26, 2023
1 parent b051391 commit 6c1c377
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions eth/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6c1c377

Please sign in to comment.