use of tech.pegasys.teku.spec.datastructures.util.ForkAndSpecMilestone in project teku by ConsenSys.
the class ForkScheduleTest method getActiveMilestones_withTransition.
@Test
public void getActiveMilestones_withTransition() {
final ForkSchedule forkSchedule = buildForkSchedule(TRANSITION_CONFIG);
final Fork phase0Fork = getPhase0Fork(TRANSITION_CONFIG);
final Fork altairFork = getAltairFork(TRANSITION_CONFIG);
assertThat(forkSchedule.getActiveMilestones()).containsExactly(new ForkAndSpecMilestone(phase0Fork, SpecMilestone.PHASE0), new ForkAndSpecMilestone(altairFork, SpecMilestone.ALTAIR));
}
use of tech.pegasys.teku.spec.datastructures.util.ForkAndSpecMilestone in project teku by ConsenSys.
the class ForkScheduleTest method getActiveMilestones_onlyAltairConfigured.
@Test
public void getActiveMilestones_onlyAltairConfigured() {
final ForkSchedule forkSchedule = buildForkSchedule(ALTAIR_CONFIG);
final Fork altairFork = getAltairFork(ALTAIR_CONFIG);
assertThat(forkSchedule.getActiveMilestones()).containsExactly(new ForkAndSpecMilestone(altairFork, SpecMilestone.ALTAIR));
}
use of tech.pegasys.teku.spec.datastructures.util.ForkAndSpecMilestone in project web3signer by ConsenSys.
the class Eth2CustomNetworkFileAcceptanceTest method signAndVerifyBlockV2SignatureForAllEnabledMilestones.
@Test
void signAndVerifyBlockV2SignatureForAllEnabledMilestones() throws Exception {
final Spec spec = SpecFactory.create(NETWORK_CONFIG_PATH.toString());
final List<ForkAndSpecMilestone> enabledMilestones = spec.getEnabledMilestones();
assertThat(enabledMilestones.size()).isEqualTo(3);
for (final ForkAndSpecMilestone forkAndSpecMilestone : enabledMilestones) {
final Eth2SigningRequestBody request = createBlockV2SigningRequest(spec, forkAndSpecMilestone);
final Bytes signingRootSignature = sendSignRequestAndReceiveSignature(request);
final Bytes expectedSigningRootSignature = calculateSigningRootSignature(request.getSigningRoot());
assertThat(signingRootSignature).isEqualTo(expectedSigningRootSignature);
}
}
Aggregations