func (sr *ShardRelayer) ListenForActions() {
	go func() {
		stream, err := sr.rpc.GetActionStream(context.Background(), &pb.ShardActionStreamRequest{
			ShardID: sr.shardID,
		})
		if err != nil {
			logrus.Error(err)
			return
		}

		for {
			action, err := stream.Recv()
			if err != nil {
				logrus.Error(err)
				return
			}

			err = sr.mempool.AcceptAction(action)
			if err != nil {
				logrus.Error(err)
				return
			}
		}
	}()
}
// ListenForActions listens for incoming actions and relays them to the mempool.
ListenForActions listens for incoming actions and relays them to the mempool.
// ListenForActions listens for incoming actions and relays them to the mempool .
func (sr *ShardRelayer) ListenForActions() {
	go func() {
		stream, err := sr.rpc.GetActionStream(context.Background(), &pb.ShardActionStreamRequest{
			ShardID: sr.shardID,
		})
		if err != nil {
			logrus.Error(err)
			return
		}
		for {
			action, err := stream.Recv()
			if err != nil {
				logrus.Error(err)
				return
			}
			err = sr.mempool.AcceptAction(action)
			if err != nil {
				logrus.Error(err)
				return
			}
		}
	}()
}
func ( sr * ShardRelayer ) ListenForActions ( ) { go func ( ) { stream , err := sr . rpc . GetActionStream ( context . Background ( ) , & pb . ShardActionStreamRequest { ShardID : sr . shardID , } ) if err != nil { logrus . Error ( err ) return } for { action , err := stream . Recv ( ) if err != nil { logrus . Error ( err ) return } err = sr . mempool . AcceptAction ( action ) if err != nil { logrus . Error ( err ) return } } } ( ) }
ListenForActions listens for incoming actions and relays them to the mempool.
ListenForActions listens for incoming actions and relays them to the mempool .