Skip to content

Commit

Permalink
fix converted aggregation bits size
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Oct 9, 2024
1 parent aaa3be4 commit 4a4bef9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ default SszBitlist createEmptyAggregationBits() {
return bitsSchema.ofBits(Math.toIntExact(bitsSchema.getMaxLength()));
}

default SszBitlist createAggregationBitsOf(final int... indices) {
default SszBitlist createAggregationBitsOf(final int size, final int... indices) {
final SszBitlistSchema<?> bitsSchema = getAggregationBitsSchema();
return bitsSchema.ofBits(Math.toIntExact(bitsSchema.getMaxLength()), indices);
return bitsSchema.ofBits(size, indices);
}

default Optional<SszBitvector> createEmptyCommitteeBits() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private SszBitlist getSingleAttestationAggregationBits(
.toVersionElectra()
.orElseThrow()
.getAttestationSchema()
.createAggregationBitsOf(validatorCommitteeBit);
.createAggregationBitsOf(committee.size(), validatorCommitteeBit);
}

private UInt64 getValidatorIndexFromAttestation(
Expand Down

0 comments on commit 4a4bef9

Please sign in to comment.