Skip to content

Commit

Permalink
remove always true flag
Browse files Browse the repository at this point in the history
  • Loading branch information
olegshmuelov committed Feb 16, 2025
1 parent 9fab744 commit 71d7856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/operator/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ var StartNodeCmd = &cobra.Command{
cfg.SSVOptions.ValidatorOptions.ValidatorSyncer = metadataSyncer

var doppelgangerHandler doppelganger.DoppelgangerProvider
if cfg.EnableDoppelgangerProtection || true {
if cfg.EnableDoppelgangerProtection {
doppelgangerHandler = doppelganger.NewDoppelgangerHandler(&doppelganger.DoppelgangerOptions{
Network: networkConfig,
BeaconNode: consensusClient,
Expand All @@ -367,7 +367,7 @@ var StartNodeCmd = &cobra.Command{
logger.Info("Doppelganger protection enabled.")
} else {
doppelgangerHandler = doppelganger.NoOpDoppelgangerHandler{}
logger.Warn("Doppelganger protection disabled.")
logger.Info("Doppelganger protection disabled.")
}
cfg.SSVOptions.ValidatorOptions.DoppelgangerHandler = doppelgangerHandler

Check warning on line 373 in cli/operator/node.go

View check run for this annotation

Codecov / codecov/patch

cli/operator/node.go#L358-L373

Added lines #L358 - L373 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion doppelganger/doppelganger.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (ds *doppelgangerHandler) StartMonitoring(ctx context.Context) {
validatorIndices := indicesFromShares(ds.validatorProvider.SelfParticipatingValidators(currentEpoch))
ds.updateDoppelgangerState(validatorIndices)

// Perform liveness check only on last slot of the epoch or first run .
// Perform liveness checks during the first run or at the last slot of the epoch
if (!firstRun && uint64(currentSlot)%slotsPerEpoch != slotsPerEpoch-1) || ds.startEpoch == currentEpoch {
continue

Check warning on line 174 in doppelganger/doppelganger.go

View check run for this annotation

Codecov / codecov/patch

doppelganger/doppelganger.go#L150-L174

Added lines #L150 - L174 were not covered by tests
}
Expand Down

0 comments on commit 71d7856

Please sign in to comment.