Skip to content

Commit

Permalink
handle in process flow
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Jan 22, 2024
1 parent 5038e46 commit d3f42a4
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
import tech.pegasys.teku.validator.api.InteropConfig;
import tech.pegasys.teku.validator.api.ValidatorApiChannel;
import tech.pegasys.teku.validator.api.ValidatorPerformanceTrackingMode;
import tech.pegasys.teku.validator.api.ValidatorTimingChannel;
import tech.pegasys.teku.validator.coordinator.ActiveValidatorTracker;
import tech.pegasys.teku.validator.coordinator.BlockFactory;
import tech.pegasys.teku.validator.coordinator.BlockOperationSelectorFactory;
Expand Down Expand Up @@ -642,6 +643,11 @@ protected void initAttesterSlashingPool() {
.reversed());
blockImporter.subscribeToVerifiedBlockAttesterSlashings(attesterSlashingPool::removeAll);
attesterSlashingPool.subscribeOperationAdded(forkChoice::onAttesterSlashing);
final ValidatorTimingChannel validatorTimingChannel =
eventChannels.getPublisher(ValidatorTimingChannel.class);
attesterSlashingPool.subscribeOperationAdded(
(operation, validationStatus, fromNetwork) ->
validatorTimingChannel.onAttesterSlashing(operation));
}

protected void initProposerSlashingPool() {
Expand All @@ -654,6 +660,11 @@ protected void initProposerSlashingPool() {
beaconBlockSchemaSupplier.andThen(BeaconBlockBodySchema::getProposerSlashingsSchema),
validator);
blockImporter.subscribeToVerifiedBlockProposerSlashings(proposerSlashingPool::removeAll);
final ValidatorTimingChannel validatorTimingChannel =
eventChannels.getPublisher(ValidatorTimingChannel.class);
proposerSlashingPool.subscribeOperationAdded(
(operation, validationStatus, fromNetwork) ->
validatorTimingChannel.onProposerSlashing(operation));
}

protected void initVoluntaryExitPool() {
Expand Down

0 comments on commit d3f42a4

Please sign in to comment.