Skip to content

Commit

Permalink
get_topic_params returns a reference to TopicScoreParams
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Aug 1, 2023
1 parent 5589e87 commit c488b10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
}

/// Returns a scoring parameters for a topic if existent.
pub fn get_topic_params(&self, _topic: GossipTopic) -> Option<TopicScoreParams> {
pub fn get_topic_params(&self, _topic: GossipTopic) -> Option<&TopicScoreParams> {
// See https://github.com/libp2p/rust-libp2p/pull/4231
// self.swarm
// .behaviour()
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/network/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
fn get_topic_params(
&self,
topic: GossipTopic,
) -> Option<lighthouse_network::libp2p::gossipsub::TopicScoreParams> {
) -> Option<&lighthouse_network::libp2p::gossipsub::TopicScoreParams> {
self.libp2p.get_topic_params(topic)
}
}
Expand Down

0 comments on commit c488b10

Please sign in to comment.