diff --git a/applications/tari_base_node/src/builder.rs b/applications/tari_base_node/src/builder.rs index 929cf8e07e..3686c18fa1 100644 --- a/applications/tari_base_node/src/builder.rs +++ b/applications/tari_base_node/src/builder.rs @@ -905,14 +905,23 @@ async fn setup_wallet_comms( } async fn add_peers_to_comms(comms: &CommsNode, peers: Vec) -> Result<(), String> { + let node_identity = comms.node_identity().clone(); for p in peers { let peer_desc = p.to_string(); info!(target: LOG_TARGET, "Adding seed peer [{}]", peer_desc); - comms - .peer_manager() - .add_peer(p) - .await - .map_err(|e| format!("Could not add peer {} to comms layer: {}", peer_desc, e))?; + + if p.public_key != node_identity.public_key().to_owned() { + comms + .peer_manager() + .add_peer(p) + .await + .map_err(|e| format!("Could not add peer {} to comms layer: {}", peer_desc, e))?; + } else { + info!( + target: LOG_TARGET, + "Attempting to add yourself [{}] as a seed peer to comms layer, ignoring request", peer_desc + ); + } } Ok(()) }