code: func (c *Chain) Submit(req *orderer.SubmitRequest, sender uint64) error {
  	if err := c.isRunning(); err != nil {
  		c.Metrics.ProposalFailures.Add(1)
  		return err
  	}
  
  	leadC := make(chan uint64, 1)
  	select {
  	case c.submitC <- &submit{req, leadC}:
  		lead := <-leadC
  		if lead == raft.None {
  			c.Metrics.ProposalFailures.Add(1)
  			return errors.Errorf("no Raft leader")
  		}
  
  		if lead != c.raftID {
  			if err := c.rpc.SendSubmit(lead, req); err != nil {
  				c.Metrics.ProposalFailures.Add(1)
  				return err
  			}
  		}
  
  	case <-c.doneC:
  		c.Metrics.ProposalFailures.Add(1)
  		return errors.Errorf("chain is stopped")
  	}
  
  	return nil
  }
docs: // Submit forwards the incoming request to:
  // - the local serveRequest goroutine if this is leader
  // - the actual leader via the transport mechanism
  // The call fails if there's no leader elected yet.