func Serve(proto string, listenAddr string, b *beacon.Blockchain, hostNode *p2p.HostNode, mempool *beacon.Mempool) error {
	lis, err := net.Listen(proto, listenAddr)
	if err != nil {
		return err
	}
	s := grpc.NewServer()
	pb.RegisterBlockchainRPCServer(s, &server{b, hostNode, mempool})
	// Register reflection service on gRPC server.
	reflection.Register(s)
	err = s.Serve(lis)
	return err
}
// Serve serves the RPC server
Serve serves the RPC server
// Serve serves the RPC server
func Serve(proto string, listenAddr string, b *beacon.Blockchain, hostNode *p2p.HostNode, mempool *beacon.Mempool) error {
	lis, err := net.Listen(proto, listenAddr)
	if err != nil {
		return err
	}
	s := grpc.NewServer()
	pb.RegisterBlockchainRPCServer(s, &server{b, hostNode, mempool})
	reflection.Register(s)
	err = s.Serve(lis)
	return err
}
func Serve ( proto string , listenAddr string , b * beacon . Blockchain , hostNode * p2p . HostNode , mempool * beacon . Mempool ) error { lis , err := net . Listen ( proto , listenAddr ) if err != nil { return err } s := grpc . NewServer ( ) pb . RegisterBlockchainRPCServer ( s , & server { b , hostNode , mempool } ) reflection . Register ( s ) err = s . Serve ( lis ) return err }
Serve serves the RPC server
Serve serves the RPC server
// Register reflection service on gRPC server.