code: func (t *Torrent) maybeCompleteMetadata() error {
  	if t.haveInfo() {
  		// Nothing to do.
  		return nil
  	}
  	if !t.haveAllMetadataPieces() {
  		// Don't have enough metadata pieces.
  		return nil
  	}
  	err := t.setInfoBytes(t.metadataBytes)
  	if err != nil {
  		t.invalidateMetadata()
  		return fmt.Errorf("error setting info bytes: %s", err)
  	}
  	if t.cl.config.Debug {
  		t.logger.Printf("%s: got metadata from peers", t)
  	}
  	return nil
  }
docs: // Returns an error if the metadata was completed, but couldn't be set for
  // some reason. Blame it on the last peer to contribute.