code: func (t *Torrent) setInfoBytes(b []byte) error {
  	if metainfo.HashBytes(b) != t.infoHash {
  		return errors.New("info bytes have wrong hash")
  	}
  	var info metainfo.Info
  	if err := bencode.Unmarshal(b, &info); err != nil {
  		return fmt.Errorf("error unmarshalling info bytes: %s", err)
  	}
  	if err := t.setInfo(&info); err != nil {
  		return err
  	}
  	t.metadataBytes = b
  	t.metadataCompletedChunks = nil
  	t.onSetInfo()
  	return nil
  }
docs: // Called when metadata for a torrent becomes available.