code: func (r *Replicator) PullChannel(channel string) error {
  	if !r.Filter(channel) {
  		r.Logger.Infof("Channel %s shouldn't be pulled. Skipping it", channel)
  		return ErrSkipped
  	}
  	r.Logger.Info("Pulling channel", channel)
  	puller := r.Puller.Clone()
  	defer puller.Close()
  	puller.Channel = channel
  
  	ledger, err := r.LedgerFactory.GetOrCreate(channel)
  	if err != nil {
  		r.Logger.Panicf("Failed to create a ledger for channel %s: %v", channel, err)
  	}
  
  	endpoint, latestHeight, _ := latestHeightAndEndpoint(puller)
  	if endpoint == "" {
  		return errors.Errorf("failed obtaining the latest block for channel %s", channel)
  	}
  	r.Logger.Info("Latest block height for channel", channel, "is", latestHeight)
  	// Ensure that if we pull the system channel, the latestHeight is bigger or equal to the
  	// bootstrap block of the system channel.
  	// Otherwise, we'd be left with a block gap.
  	if channel == r.SystemChannel && latestHeight-1 < r.BootBlock.Header.Number {
  		return errors.Errorf("latest height found among system channel(%s) orderers is %d, but the boot block's "+
  			"sequence is %d", r.SystemChannel, latestHeight, r.BootBlock.Header.Number)
  	}
  	return r.pullChannelBlocks(channel, puller, latestHeight, ledger)
  }
docs: // PullChannel pulls the given channel from some orderer,
  // and commits it to the ledger.