func (s *ShardRPCServer) GetActionStream(req *pb.ShardActionStreamRequest, res pb.ShardRPC_GetActionStreamServer) error {
	manager, err := s.sm.GetManager(req.ShardID)
	if err != nil {
		return err
	}

	n := NewActionStreamGenerator(func(action *pb.ShardChainAction) {
		_ = res.Send(action)
	}, s.config)
	manager.RegisterNotifee(n)
	<-res.Context().Done()
	manager.UnregisterNotifee(n)

	return nil
}
// GetActionStream gets an action stream.
GetActionStream gets an action stream.
// GetActionStream gets an action stream .
func (s *ShardRPCServer) GetActionStream(req *pb.ShardActionStreamRequest, res pb.ShardRPC_GetActionStreamServer) error {
	manager, err := s.sm.GetManager(req.ShardID)
	if err != nil {
		return err
	}
	n := NewActionStreamGenerator(func(action *pb.ShardChainAction) {
		_ = res.Send(action)
	}, s.config)
	manager.RegisterNotifee(n)
	<-res.Context().Done()
	manager.UnregisterNotifee(n)
	return nil
}
func ( s * ShardRPCServer ) GetActionStream ( req * pb . ShardActionStreamRequest , res pb . ShardRPC_GetActionStreamServer ) error { manager , err := s . sm . GetManager ( req . ShardID ) if err != nil { return err } n := NewActionStreamGenerator ( func ( action * pb . ShardChainAction ) { _ = res . Send ( action ) } , s . config ) manager . RegisterNotifee ( n ) <- res . Context ( ) . Done ( ) manager . UnregisterNotifee ( n ) return nil }
GetActionStream gets an action stream.
GetActionStream gets an action stream .