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()));
});
}
Aggregations