diff --git a/node/node_handler.go b/node/node_handler.go index d1fde694f..674c12692 100644 --- a/node/node_handler.go +++ b/node/node_handler.go @@ -388,9 +388,10 @@ func (node *Node) pingMessageHandler(msgPayload []byte, sender string) int { return 0 } - // Add to Node's peer list anyway - utils.GetLogInstance().Info("Add Peer to Node", "Node", node.Consensus.GetNodeID(), "Pear", peer) - node.AddPeers([]*p2p.Peer{peer}) + if node.NodeConfig.IsLeader() { + utils.GetLogInstance().Info("Add Peer to Node", "Node", node.Consensus.GetNodeID(), "Pear", peer) + node.AddPeers([]*p2p.Peer{peer}) + } return 1 }