Skip to content
Snippets Groups Projects
Commit 922df964 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

review: test code, not dead code

parent febd3569
No related branches found
No related tags found
1 merge request!316Resolve "Add RPC method to list peers"
Pipeline #39926 failed
...@@ -62,7 +62,7 @@ pub enum DuniterPeeringEvent { ...@@ -62,7 +62,7 @@ pub enum DuniterPeeringEvent {
pub enum DuniterPeeringCommand { pub enum DuniterPeeringCommand {
/// Send a peering to a peer. /// Send a peering to a peer.
#[allow(dead_code)] // only used in tests for now, maybe in the future by RPC #[cfg(test)]
SendPeering(PeerId, Peering), SendPeering(PeerId, Peering),
} }
...@@ -231,6 +231,7 @@ where ...@@ -231,6 +231,7 @@ where
async fn handle_command(&mut self, cmd: DuniterPeeringCommand) { async fn handle_command(&mut self, cmd: DuniterPeeringCommand) {
match cmd { match cmd {
#[cfg(test)]
DuniterPeeringCommand::SendPeering(peer, peering) => { DuniterPeeringCommand::SendPeering(peer, peering) => {
debug!(target: "duniter-libp2p", "[{}]Sending COMMANDED self peering to {}", self.network.local_peer_id(), peer); debug!(target: "duniter-libp2p", "[{}]Sending COMMANDED self peering to {}", self.network.local_peer_id(), peer);
match self match self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment