code: func (r *Registrar) CreateChain(chainName string) {
  	lf, err := r.ledgerFactory.GetOrCreate(chainName)
  	if err != nil {
  		logger.Panicf("Failed obtaining ledger factory for %s: %v", chainName, err)
  	}
  	chain := r.GetChain(chainName)
  	if chain != nil {
  		logger.Infof("A chain of type %T for channel %s already exists. "+
  			"Halting it.", chain.Chain, chainName)
  		chain.Halt()
  	}
  	r.newChain(configTx(lf))
  }
docs: // CreateChain makes the Registrar create a chain with the given name.