Search in sources :

Example 1 with BeaconBlockBodySchemaAltair

use of tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.BeaconBlockBodySchemaAltair in project teku by ConsenSys.

the class BeaconBlockBodyAltair method asInternalBeaconBlockBody.

@Override
public tech.pegasys.teku.spec.datastructures.blocks.blockbody.BeaconBlockBody asInternalBeaconBlockBody(final SpecVersion spec, Consumer<BeaconBlockBodyBuilder> builderRef) {
    BeaconBlockBodySchemaAltair<?> schema = (BeaconBlockBodySchemaAltair<?>) spec.getSchemaDefinitions().getBeaconBlockBodySchema();
    SyncAggregateSchema syncAggregateSchema = schema.getSyncAggregateSchema();
    return super.asInternalBeaconBlockBody(spec, (builder) -> {
        builderRef.accept(builder);
        builder.syncAggregate(() -> syncAggregateSchema.create(syncAggregateSchema.getSyncCommitteeBitsSchema().fromBytes(syncAggregate.syncCommitteeBits).getAllSetBits(), syncAggregate.syncCommitteeSignature.asInternalBLSSignature()));
    });
}
Also used : SyncAggregateSchema(tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregateSchema) BeaconBlockBodySchemaAltair(tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.BeaconBlockBodySchemaAltair)

Aggregations

BeaconBlockBodySchemaAltair (tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.BeaconBlockBodySchemaAltair)1 SyncAggregateSchema (tech.pegasys.teku.spec.datastructures.blocks.blockbody.versions.altair.SyncAggregateSchema)1