code: func (msg *MsgBlock) BtcEncode(w io.Writer, pver uint32, enc MessageEncoding) error {
  	err := writeBlockHeader(w, pver, &msg.Header)
  	if err != nil {
  		return err
  	}
  
  	err = WriteVarInt(w, pver, uint64(len(msg.Transactions)))
  	if err != nil {
  		return err
  	}
  
  	for _, tx := range msg.Transactions {
  		err = tx.BtcEncode(w, pver, enc)
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // BtcEncode encodes the receiver to w using the bitcoin protocol encoding.
  // This is part of the Message interface implementation.
  // See Serialize for encoding blocks to be stored to disk, such as in a
  // database, as opposed to encoding blocks for the wire.