@Test public void shouldSubscribeToCommitteeTopicWhenNewCommitteeAdded() { final int committeeIndex = 2; duty.addValidator( validator1, 1, dataStructureUtil.randomSignature(), committeeIndex, new SafeFuture<>()); verify(validatorApiChannel).subscribeToBeaconCommitteeForAggregation(committeeIndex, SLOT); }
public void addValidator( final Validator validator, final int validatorIndex, final BLSSignature proof, final int attestationCommitteeIndex, final SafeFuture<Optional<Attestation>> unsignedAttestationFuture) { aggregatorsByCommitteeIndex.computeIfAbsent( attestationCommitteeIndex, committeeIndex -> { validatorApiChannel.subscribeToBeaconCommitteeForAggregation(committeeIndex, slot); return new CommitteeAggregator( validator, UInt64.valueOf(validatorIndex), attestationCommitteeIndex, proof, unsignedAttestationFuture); }); }
AggregationDuty implements Duty { public void addValidator( final Validator validator, final int validatorIndex, final BLSSignature proof, final int attestationCommitteeIndex, final SafeFuture<Optional<Attestation>> unsignedAttestationFuture) { aggregatorsByCommitteeIndex.computeIfAbsent( attestationCommitteeIndex, committeeIndex -> { validatorApiChannel.subscribeToBeaconCommitteeForAggregation(committeeIndex, slot); return new CommitteeAggregator( validator, UInt64.valueOf(validatorIndex), attestationCommitteeIndex, proof, unsignedAttestationFuture); }); } }
AggregationDuty implements Duty { public void addValidator( final Validator validator, final int validatorIndex, final BLSSignature proof, final int attestationCommitteeIndex, final SafeFuture<Optional<Attestation>> unsignedAttestationFuture) { aggregatorsByCommitteeIndex.computeIfAbsent( attestationCommitteeIndex, committeeIndex -> { validatorApiChannel.subscribeToBeaconCommitteeForAggregation(committeeIndex, slot); return new CommitteeAggregator( validator, UInt64.valueOf(validatorIndex), attestationCommitteeIndex, proof, unsignedAttestationFuture); }); } AggregationDuty(
      final UInt64 slot,
      final ValidatorApiChannel validatorApiChannel,
      final ForkProvider forkProvider,
      final ValidatorLogger validatorLogger); }
AggregationDuty implements Duty { public void addValidator( final Validator validator, final int validatorIndex, final BLSSignature proof, final int attestationCommitteeIndex, final SafeFuture<Optional<Attestation>> unsignedAttestationFuture) { aggregatorsByCommitteeIndex.computeIfAbsent( attestationCommitteeIndex, committeeIndex -> { validatorApiChannel.subscribeToBeaconCommitteeForAggregation(committeeIndex, slot); return new CommitteeAggregator( validator, UInt64.valueOf(validatorIndex), attestationCommitteeIndex, proof, unsignedAttestationFuture); }); } AggregationDuty(
      final UInt64 slot,
      final ValidatorApiChannel validatorApiChannel,
      final ForkProvider forkProvider,
      final ValidatorLogger validatorLogger); void addValidator(
      final Validator validator,
      final int validatorIndex,
      final BLSSignature proof,
      final int attestationCommitteeIndex,
      final SafeFuture<Optional<Attestation>> unsignedAttestationFuture); @Override SafeFuture<DutyResult> performDuty(); SafeFuture<DutyResult> aggregateCommittee(final CommitteeAggregator aggregator); CompletionStage<Optional<Attestation>> createAggregate(
      final Optional<Attestation> maybeAttestation); @Override String getProducedType(); }
AggregationDuty implements Duty { public void addValidator( final Validator validator, final int validatorIndex, final BLSSignature proof, final int attestationCommitteeIndex, final SafeFuture<Optional<Attestation>> unsignedAttestationFuture) { aggregatorsByCommitteeIndex.computeIfAbsent( attestationCommitteeIndex, committeeIndex -> { validatorApiChannel.subscribeToBeaconCommitteeForAggregation(committeeIndex, slot); return new CommitteeAggregator( validator, UInt64.valueOf(validatorIndex), attestationCommitteeIndex, proof, unsignedAttestationFuture); }); } AggregationDuty(
      final UInt64 slot,
      final ValidatorApiChannel validatorApiChannel,
      final ForkProvider forkProvider,
      final ValidatorLogger validatorLogger); void addValidator(
      final Validator validator,
      final int validatorIndex,
      final BLSSignature proof,
      final int attestationCommitteeIndex,
      final SafeFuture<Optional<Attestation>> unsignedAttestationFuture); @Override SafeFuture<DutyResult> performDuty(); SafeFuture<DutyResult> aggregateCommittee(final CommitteeAggregator aggregator); CompletionStage<Optional<Attestation>> createAggregate(
      final Optional<Attestation> maybeAttestation); @Override String getProducedType();  }