only show setting up doppelganger detection log message if enabled (#3391)
* only show setting up doppelganger detection log message if enabled * correct indentation
This commit is contained in:
parent
6849536742
commit
2275fad335
|
@ -97,7 +97,7 @@ type
|
||||||
## whose purpose is to quickly filter out spam, then will (usually) delegate
|
## whose purpose is to quickly filter out spam, then will (usually) delegate
|
||||||
## full validation to the proper manager - finally, metrics and monitoring
|
## full validation to the proper manager - finally, metrics and monitoring
|
||||||
## are updated.
|
## are updated.
|
||||||
doppelGangerDetectionEnabled*: bool
|
doppelgangerDetectionEnabled*: bool
|
||||||
|
|
||||||
# Local sources of truth for validation
|
# Local sources of truth for validation
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
@ -136,7 +136,7 @@ type
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
proc new*(T: type Eth2Processor,
|
proc new*(T: type Eth2Processor,
|
||||||
doppelGangerDetectionEnabled: bool,
|
doppelgangerDetectionEnabled: bool,
|
||||||
blockProcessor: ref BlockProcessor,
|
blockProcessor: ref BlockProcessor,
|
||||||
validatorMonitor: ref ValidatorMonitor,
|
validatorMonitor: ref ValidatorMonitor,
|
||||||
dag: ChainDAGRef,
|
dag: ChainDAGRef,
|
||||||
|
@ -150,7 +150,7 @@ proc new*(T: type Eth2Processor,
|
||||||
taskpool: TaskPoolPtr
|
taskpool: TaskPoolPtr
|
||||||
): ref Eth2Processor =
|
): ref Eth2Processor =
|
||||||
(ref Eth2Processor)(
|
(ref Eth2Processor)(
|
||||||
doppelGangerDetectionEnabled: doppelGangerDetectionEnabled,
|
doppelgangerDetectionEnabled: doppelgangerDetectionEnabled,
|
||||||
doppelgangerDetection: DoppelgangerProtection(
|
doppelgangerDetection: DoppelgangerProtection(
|
||||||
nodeLaunchSlot: getBeaconTime().slotOrZero,
|
nodeLaunchSlot: getBeaconTime().slotOrZero,
|
||||||
broadcastStartEpoch: FAR_FUTURE_EPOCH),
|
broadcastStartEpoch: FAR_FUTURE_EPOCH),
|
||||||
|
@ -242,10 +242,10 @@ proc setupDoppelgangerDetection*(self: var Eth2Processor, slot: Slot) =
|
||||||
|
|
||||||
self.doppelgangerDetection.broadcastStartEpoch =
|
self.doppelgangerDetection.broadcastStartEpoch =
|
||||||
slot.epoch + duplicateValidatorEpochs
|
slot.epoch + duplicateValidatorEpochs
|
||||||
notice "Setting up doppelganger protection",
|
if self.doppelgangerDetectionEnabled:
|
||||||
|
notice "Setting up doppelganger detection",
|
||||||
epoch = slot.epoch,
|
epoch = slot.epoch,
|
||||||
broadcastStartEpoch =
|
broadcastStartEpoch = self.doppelgangerDetection.broadcastStartEpoch
|
||||||
self.doppelgangerDetection.broadcastStartEpoch
|
|
||||||
|
|
||||||
proc checkForPotentialDoppelganger(
|
proc checkForPotentialDoppelganger(
|
||||||
self: var Eth2Processor, attestation: Attestation,
|
self: var Eth2Processor, attestation: Attestation,
|
||||||
|
|
Loading…
Reference in New Issue