use of tech.pegasys.teku.infrastructure.bytes.Bytes4 in project teku by ConsenSys.
the class ForkTest method equalsReturnsFalseWhenPreviousVersionsAreDifferent.
@Test
void equalsReturnsFalseWhenPreviousVersionsAreDifferent() {
Fork testFork = new Fork(new Bytes4(previousVersion.getWrappedBytes().not()), currentVersion, epoch);
assertNotEquals(fork, testFork);
}
use of tech.pegasys.teku.infrastructure.bytes.Bytes4 in project teku by ConsenSys.
the class SpecMilestoneTest method getForkVersion_bellatrix.
@Test
public void getForkVersion_bellatrix() {
final Bytes4 expected = bellatrixSpecConfig.getBellatrixForkVersion();
assertThat(SpecMilestone.getForkVersion(bellatrixSpecConfig, SpecMilestone.BELLATRIX)).contains(expected);
}
use of tech.pegasys.teku.infrastructure.bytes.Bytes4 in project teku by ConsenSys.
the class SpecMilestoneTest method getForkVersion_phase0.
@Test
public void getForkVersion_phase0() {
final Bytes4 expected = altairSpecConfig.getGenesisForkVersion();
assertThat(SpecMilestone.getForkVersion(altairSpecConfig, SpecMilestone.PHASE0)).contains(expected);
}
use of tech.pegasys.teku.infrastructure.bytes.Bytes4 in project teku by ConsenSys.
the class BlockTopicHandlerTest method returnProperTopicName.
@Test
public void returnProperTopicName() {
final Bytes4 forkDigest = Bytes4.fromHexString("0x11223344");
final Eth2TopicHandler<SignedBeaconBlock> topicHandler = new Eth2TopicHandler<>(recentChainData, asyncRunner, processor, gossipEncoding, forkDigest, GossipTopicName.BEACON_BLOCK, spec.getGenesisSchemaDefinitions().getSignedBeaconBlockSchema(), GOSSIP_MAX_SIZE);
assertThat(topicHandler.getTopic()).isEqualTo("/eth2/11223344/beacon_block/ssz_snappy");
}
use of tech.pegasys.teku.infrastructure.bytes.Bytes4 in project teku by ConsenSys.
the class ProposerSlashingTopicHandlerTest method returnProperTopicName.
@Test
public void returnProperTopicName() {
final Bytes4 forkDigest = Bytes4.fromHexString("0x11223344");
Eth2TopicHandler<ProposerSlashing> topicHandler = new Eth2TopicHandler<>(recentChainData, asyncRunner, processor, gossipEncoding, forkDigest, GossipTopicName.PROPOSER_SLASHING, ProposerSlashing.SSZ_SCHEMA, GOSSIP_MAX_SIZE);
assertThat(topicHandler.getTopic()).isEqualTo("/eth2/11223344/proposer_slashing/ssz_snappy");
}
Aggregations