Skip to content

Commit

Permalink
small nits
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Jun 28, 2023
1 parent e9f65fa commit 23f2ffd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public NetworkingSpecConfig getNetworkingConfig() {
public Optional<NetworkingSpecConfigDeneb> getNetworkingConfigDeneb() {
return Optional.ofNullable(forMilestone(DENEB))
.map(SpecVersion::getConfig)
.map(specConfig -> (SpecConfigDeneb) specConfig.getNetworkingConfig());
.map(specConfig -> (NetworkingSpecConfigDeneb) specConfig.getNetworkingConfig());
}

public SchemaDefinitions getGenesisSchemaDefinitions() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import tech.pegasys.teku.infrastructure.bytes.Bytes4;
import tech.pegasys.teku.networking.eth2.gossip.encoding.GossipEncoding;
import tech.pegasys.teku.spec.Spec;
import tech.pegasys.teku.spec.config.NetworkingSpecConfigDeneb;
import tech.pegasys.teku.spec.constants.NetworkConstants;

/**
Expand Down Expand Up @@ -73,11 +74,14 @@ public static Set<String> getAllTopics(
for (int i = 0; i < NetworkConstants.SYNC_COMMITTEE_SUBNET_COUNT; i++) {
topics.add(getSyncCommitteeSubnetTopic(forkDigest, i, gossipEncoding));
}
if (spec.getNetworkingConfigDeneb().isPresent()) {
for (int i = 0; i < spec.getNetworkingConfigDeneb().get().getBlobSidecarSubnetCount(); i++) {
topics.add(getBlobSidecarSubnetTopic(forkDigest, i, gossipEncoding));
}
}
spec.getNetworkingConfigDeneb()
.map(NetworkingSpecConfigDeneb::getBlobSidecarSubnetCount)
.ifPresent(
blobSidecarSubnetCount -> {
for (int i = 0; i < blobSidecarSubnetCount; i++) {
topics.add(getBlobSidecarSubnetTopic(forkDigest, i, gossipEncoding));
}
});
for (GossipTopicName topicName : GossipTopicName.values()) {
topics.add(GossipTopics.getTopic(forkDigest, topicName, gossipEncoding));
}
Expand Down

0 comments on commit 23f2ffd

Please sign in to comment.