9797 # # whose purpose is to quickly filter out spam, then will (usually) delegate
9898 # # full validation to the proper manager - finally, metrics and monitoring
9999 # # are updated.
100- doppelGangerDetectionEnabled * : bool
100+ doppelgangerDetectionEnabled * : bool
101101
102102 # Local sources of truth for validation
103103 # ----------------------------------------------------------------
136136# ------------------------------------------------------------------------------
137137
138138proc new * (T: type Eth2Processor ,
139- doppelGangerDetectionEnabled : bool ,
139+ doppelgangerDetectionEnabled : bool ,
140140 blockProcessor: ref BlockProcessor ,
141141 validatorMonitor: ref ValidatorMonitor ,
142142 dag: ChainDAGRef ,
@@ -150,7 +150,7 @@ proc new*(T: type Eth2Processor,
150150 taskpool: TaskPoolPtr
151151 ): ref Eth2Processor =
152152 (ref Eth2Processor )(
153- doppelGangerDetectionEnabled: doppelGangerDetectionEnabled ,
153+ doppelgangerDetectionEnabled: doppelgangerDetectionEnabled ,
154154 doppelgangerDetection: DoppelgangerProtection (
155155 nodeLaunchSlot: getBeaconTime ().slotOrZero,
156156 broadcastStartEpoch: FAR_FUTURE_EPOCH ),
@@ -242,10 +242,10 @@ proc setupDoppelgangerDetection*(self: var Eth2Processor, slot: Slot) =
242242
243243 self.doppelgangerDetection.broadcastStartEpoch =
244244 slot.epoch + duplicateValidatorEpochs
245- notice " Setting up doppelganger protection " ,
246- epoch = slot.epoch ,
247- broadcastStartEpoch =
248- self.doppelgangerDetection.broadcastStartEpoch
245+ if self.doppelgangerDetectionEnabled:
246+ notice " Setting up doppelganger detection " ,
247+ epoch = slot.epoch,
248+ broadcastStartEpoch = self.doppelgangerDetection.broadcastStartEpoch
249249
250250proc checkForPotentialDoppelganger (
251251 self: var Eth2Processor , attestation: Attestation ,
0 commit comments