func (s *ShardSyncManager) PeerConnected(id peer.ID, dir network.Direction) {
	// if the peer is inbound, we should send them a version message
	if dir == network.DirInbound {
		err := s.protocols.shard.SendMessage(id, &pb.ShardVersionMessage{
			Version: 0,
			Height:  s.manager.Chain.Height(),
		})
		if err != nil {
			logrus.Error(err)
			return
		}
	}
}
// PeerConnected is called when a peer connects to the shard module.
PeerConnected is called when a peer connects to the shard module.
// PeerConnected is called when a peer connects to the shard module .
func (s *ShardSyncManager) PeerConnected(id peer.ID, dir network.Direction) {
	if dir == network.DirInbound {
		err := s.protocols.shard.SendMessage(id, &pb.ShardVersionMessage{
			Version: 0,
			Height:  s.manager.Chain.Height(),
		})
		if err != nil {
			logrus.Error(err)
			return
		}
	}
}
func ( s * ShardSyncManager ) PeerConnected ( id peer . ID , dir network . Direction ) { if dir == network . DirInbound { err := s . protocols . shard . SendMessage ( id , & pb . ShardVersionMessage { Version : 0 , Height : s . manager . Chain . Height ( ) , } ) if err != nil { logrus . Error ( err ) return } } }
PeerConnected is called when a peer connects to the shard module.
PeerConnected is called when a peer connects to the shard module .
// if the peer is inbound, we should send them a version message