From 105c6173d90eeb6bb422f15e3e810f53610db09e Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Tue, 7 Nov 2023 20:04:11 +0000 Subject: [PATCH] small nit --- .../java/tech/pegasys/teku/spec/util/DataStructureUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java index 7b3c34d2999..dd0debee503 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java @@ -2261,8 +2261,9 @@ public BlobsBundle randomBlobsBundle(final int count) { private BlobsBundle randomBlobsBundle(final Optional count, final UInt64 slot) { final BlobSchema blobSchema = getDenebSchemaDefinitions(slot).getBlobSchema(); final List commitments = - (count.isPresent() ? randomBlobKzgCommitments(count.get()) : randomBlobKzgCommitments()) - .stream().map(SszKZGCommitment::getKZGCommitment).collect(toList()); + count.map(this::randomBlobKzgCommitments).orElse(randomBlobKzgCommitments()).stream() + .map(SszKZGCommitment::getKZGCommitment) + .toList(); final List proofs = IntStream.range(0, commitments.size()).mapToObj(__ -> randomKZGProof()).collect(toList()); return new BlobsBundle(