Search in sources :

Example 1 with AttesterSlashingSchema

use of tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing.AttesterSlashingSchema in project teku by ConsenSys.

the class BeaconBlockBodySchemaPhase0Test method create_mainnet.

@Test
public void create_mainnet() {
    final Spec spec = TestSpecFactory.createMainnetPhase0();
    final SpecConfig specConfig = spec.getGenesisSpecConfig();
    final BeaconBlockBodySchemaPhase0 specA = BeaconBlockBodySchemaPhase0.create(specConfig, new AttesterSlashingSchema(new IndexedAttestationSchema(specConfig)));
    final BeaconBlockBodySchemaPhase0 specB = BeaconBlockBodySchemaPhase0.create(specConfig, new AttesterSlashingSchema(new IndexedAttestationSchema(specConfig)));
    assertThat(specA).isEqualTo(specB);
}
Also used : IndexedAttestationSchema(tech.pegasys.teku.spec.datastructures.operations.IndexedAttestation.IndexedAttestationSchema) AttesterSlashingSchema(tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing.AttesterSlashingSchema) SpecConfig(tech.pegasys.teku.spec.config.SpecConfig) Spec(tech.pegasys.teku.spec.Spec) Test(org.junit.jupiter.api.Test)

Example 2 with AttesterSlashingSchema

use of tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing.AttesterSlashingSchema in project teku by ConsenSys.

the class BeaconBlockBodySchemaPhase0Test method create_minimal.

@Test
public void create_minimal() {
    final Spec spec = TestSpecFactory.createMinimalPhase0();
    final SpecConfig specConfig = spec.getGenesisSpecConfig();
    final BeaconBlockBodySchemaPhase0 specA = BeaconBlockBodySchemaPhase0.create(specConfig, new AttesterSlashingSchema(new IndexedAttestationSchema(specConfig)));
    final BeaconBlockBodySchemaPhase0 specB = BeaconBlockBodySchemaPhase0.create(specConfig, new AttesterSlashingSchema(new IndexedAttestationSchema(specConfig)));
    assertThat(specA).isEqualTo(specB);
}
Also used : IndexedAttestationSchema(tech.pegasys.teku.spec.datastructures.operations.IndexedAttestation.IndexedAttestationSchema) AttesterSlashingSchema(tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing.AttesterSlashingSchema) SpecConfig(tech.pegasys.teku.spec.config.SpecConfig) Spec(tech.pegasys.teku.spec.Spec) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)2 Spec (tech.pegasys.teku.spec.Spec)2 SpecConfig (tech.pegasys.teku.spec.config.SpecConfig)2 AttesterSlashingSchema (tech.pegasys.teku.spec.datastructures.operations.AttesterSlashing.AttesterSlashingSchema)2 IndexedAttestationSchema (tech.pegasys.teku.spec.datastructures.operations.IndexedAttestation.IndexedAttestationSchema)2