From c488b10cb4794b3c41194286c8048b57cd74dcce Mon Sep 17 00:00:00 2001 From: ackintosh Date: Wed, 2 Aug 2023 07:06:06 +0900 Subject: [PATCH] get_topic_params returns a reference to TopicScoreParams --- beacon_node/lighthouse_network/src/service/mod.rs | 2 +- beacon_node/network/src/service.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beacon_node/lighthouse_network/src/service/mod.rs b/beacon_node/lighthouse_network/src/service/mod.rs index 649526fba18..fb92550b70f 100644 --- a/beacon_node/lighthouse_network/src/service/mod.rs +++ b/beacon_node/lighthouse_network/src/service/mod.rs @@ -606,7 +606,7 @@ impl Network { } /// Returns a scoring parameters for a topic if existent. - pub fn get_topic_params(&self, _topic: GossipTopic) -> Option { + pub fn get_topic_params(&self, _topic: GossipTopic) -> Option<&TopicScoreParams> { // See https://github.com/libp2p/rust-libp2p/pull/4231 // self.swarm // .behaviour() diff --git a/beacon_node/network/src/service.rs b/beacon_node/network/src/service.rs index e673330d92f..a55a99b8de0 100644 --- a/beacon_node/network/src/service.rs +++ b/beacon_node/network/src/service.rs @@ -971,7 +971,7 @@ impl NetworkService { fn get_topic_params( &self, topic: GossipTopic, - ) -> Option { + ) -> Option<&lighthouse_network::libp2p::gossipsub::TopicScoreParams> { self.libp2p.get_topic_params(topic) } }