Skip to content

Commit

Permalink
Disables resync when init-sync is disabled (#7259)
Browse files Browse the repository at this point in the history
* disables resync when init-sync is disabled
  • Loading branch information
farazdagi authored Sep 17, 2020
1 parent a335bbb commit 76bac74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion beacon-chain/sync/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
"github.com/prysmaticlabs/prysm/beacon-chain/db"
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
"github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations"
"github.com/prysmaticlabs/prysm/beacon-chain/operations/slashings"
"github.com/prysmaticlabs/prysm/beacon-chain/operations/voluntaryexits"
Expand Down Expand Up @@ -155,7 +156,9 @@ func (s *Service) Start() {
s.processPendingBlocksQueue()
s.processPendingAttsQueue()
s.maintainPeerStatuses()
s.resyncIfBehind()
if !flags.Get().DisableSync {
s.resyncIfBehind()
}

// Update sync metrics.
runutil.RunEvery(s.ctx, syncMetricsInterval, s.updateMetrics)
Expand Down

0 comments on commit 76bac74

Please sign in to comment.