Skip to content

Commit

Permalink
remove unused method in gossip filter test
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Nov 6, 2024
1 parent 49d0e4b commit 5396d1a
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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))))
Expand All @@ -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);
}
Expand Down

0 comments on commit 5396d1a

Please sign in to comment.