From 5396d1ad0894670ea7b1a9283ff33c01d5198cba Mon Sep 17 00:00:00 2001 From: Mehdi AOUADI Date: Wed, 6 Nov 2024 13:18:46 +0100 Subject: [PATCH] remove unused method in gossip filter test --- .../gossip/topics/Eth2GossipTopicFilterTest.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/gossip/topics/Eth2GossipTopicFilterTest.java b/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/gossip/topics/Eth2GossipTopicFilterTest.java index 9001d589914..3b275ee7595 100644 --- a/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/gossip/topics/Eth2GossipTopicFilterTest.java +++ b/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/gossip/topics/Eth2GossipTopicFilterTest.java @@ -37,7 +37,6 @@ import tech.pegasys.teku.spec.TestSpecInvocationContextProvider; import tech.pegasys.teku.spec.config.SpecConfig; import tech.pegasys.teku.spec.config.SpecConfigDeneb; -import tech.pegasys.teku.spec.config.SpecConfigElectra; import tech.pegasys.teku.spec.datastructures.state.Fork; import tech.pegasys.teku.spec.datastructures.state.ForkInfo; import tech.pegasys.teku.spec.util.DataStructureUtil; @@ -140,7 +139,8 @@ void shouldConsiderAllBlobSidecarSubnetsRelevant() { @TestTemplate void shouldNotConsiderBlobSidecarWithIncorrectSubnetIdRelevant() { - final int blobSidecarSubnetCount = getBlobSidecarSubnetCount(); + final int blobSidecarSubnetCount = + spec.forMilestone(specMilestone).miscHelpers().getBlobSidecarSubnetCount().orElseThrow(); assertThat( filter.isRelevantTopic( getTopicName(getBlobSidecarSubnetTopicName(blobSidecarSubnetCount + 1)))) @@ -160,14 +160,6 @@ void shouldNotAllowTopicsWithUnknownForkDigest() { assertThat(filter.isRelevantTopic(irrelevantTopic)).isFalse(); } - private int getBlobSidecarSubnetCount() { - return specMilestone.isGreaterThanOrEqualTo(SpecMilestone.ELECTRA) - ? SpecConfigElectra.required(spec.forMilestone(SpecMilestone.ELECTRA).getConfig()) - .getBlobSidecarSubnetCountElectra() - : SpecConfigDeneb.required(spec.forMilestone(SpecMilestone.DENEB).getConfig()) - .getBlobSidecarSubnetCount(); - } - private String getTopicName(final GossipTopicName name) { return GossipTopics.getTopic(forkInfo.getForkDigest(spec), name, SSZ_SNAPPY); }