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) {