From 67645df4bbe5dc27ebdda34146a5c35bc1479875 Mon Sep 17 00:00:00 2001 From: Stefan Bratanov Date: Fri, 3 Nov 2023 08:54:34 +0000 Subject: [PATCH] use set instead of list --- .../rpc/beaconchain/methods/BlobSidecarsByRootValidator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobSidecarsByRootValidator.java b/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobSidecarsByRootValidator.java index a43e946a07b..308466e657a 100644 --- a/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobSidecarsByRootValidator.java +++ b/networking/eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobSidecarsByRootValidator.java @@ -14,6 +14,7 @@ package tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods; import java.util.List; +import java.util.Set; import tech.pegasys.teku.kzg.KZG; import tech.pegasys.teku.networking.eth2.rpc.beaconchain.methods.BlobSidecarsResponseInvalidResponseException.InvalidResponseType; import tech.pegasys.teku.networking.p2p.peer.Peer; @@ -23,7 +24,7 @@ public class BlobSidecarsByRootValidator extends AbstractBlobSidecarsValidator { - private final List expectedBlobIdentifiers; + private final Set expectedBlobIdentifiers; public BlobSidecarsByRootValidator( final Peer peer, @@ -31,7 +32,7 @@ public BlobSidecarsByRootValidator( final KZG kzg, final List expectedBlobIdentifiers) { super(peer, spec, kzg); - this.expectedBlobIdentifiers = expectedBlobIdentifiers; + this.expectedBlobIdentifiers = Set.copyOf(expectedBlobIdentifiers); } public void validate(final BlobSidecar blobSidecar) {