func (s *ShardRPCServer) GetListeningAddresses(context.Context, *empty.Empty) (*pb.ListeningAddressesResponse, error) {
	addrs := s.hn.GetHost().Addrs()

	info := peer.AddrInfo{
		ID:    s.hn.GetHost().ID(),
		Addrs: addrs,
	}

	p2paddrs, err := peer.AddrInfoToP2pAddrs(&info)
	if err != nil {
		return nil, err
	}

	addrStrings := make([]string, len(p2paddrs))
	for i := range p2paddrs {
		addrStrings[i] = p2paddrs[i].String()
	}

	return &pb.ListeningAddressesResponse{
		Addresses: addrStrings,
	}, nil
}
// GetListeningAddresses gets listening addresses for the shard module.
GetListeningAddresses gets listening addresses for the shard module.
// GetListeningAddresses gets listening addresses for the shard module .
func (s *ShardRPCServer) GetListeningAddresses(context.Context, *empty.Empty) (*pb.ListeningAddressesResponse, error) {
	addrs := s.hn.GetHost().Addrs()
	info := peer.AddrInfo{
		ID:    s.hn.GetHost().ID(),
		Addrs: addrs,
	}
	p2paddrs, err := peer.AddrInfoToP2pAddrs(&info)
	if err != nil {
		return nil, err
	}
	addrStrings := make([]string, len(p2paddrs))
	for i := range p2paddrs {
		addrStrings[i] = p2paddrs[i].String()
	}
	return &pb.ListeningAddressesResponse{
		Addresses: addrStrings,
	}, nil
}
func ( s * ShardRPCServer ) GetListeningAddresses ( context . Context , * empty . Empty ) ( * pb . ListeningAddressesResponse , error ) { addrs := s . hn . GetHost ( ) . Addrs ( ) info := peer . AddrInfo { ID : s . hn . GetHost ( ) . ID ( ) , Addrs : addrs , } p2paddrs , err := peer . AddrInfoToP2pAddrs ( & info ) if err != nil { return nil , err } addrStrings := make ( [ ] string , len ( p2paddrs ) ) for i := range p2paddrs { addrStrings [ i ] = p2paddrs [ i ] . String ( ) } return & pb . ListeningAddressesResponse { Addresses : addrStrings , } , nil }
GetListeningAddresses gets listening addresses for the shard module.
GetListeningAddresses gets listening addresses for the shard module .