code: func (msg *MsgMerkleBlock) BtcDecode(r io.Reader, pver uint32, enc MessageEncoding) error {
  	if pver < BIP0037Version {
  		str := fmt.Sprintf("merkleblock message invalid for protocol "+
  			"version %d", pver)
  		return messageError("MsgMerkleBlock.BtcDecode", str)
  	}
  
  	err := readBlockHeader(r, pver, &msg.Header)
  	if err != nil {
  		return err
  	}
  
  	err = readElement(r, &msg.Transactions)
  	if err != nil {
  		return err
  	}
  
  	// Read num block locator hashes and limit to max.
  	count, err := ReadVarInt(r, pver)
  	if err != nil {
  		return err
  	}
  	if count > maxTxPerBlock {
  		str := fmt.Sprintf("too many transaction hashes for message "+
  			"[count %v, max %v]", count, maxTxPerBlock)
  		return messageError("MsgMerkleBlock.BtcDecode", str)
  	}
  
  	// Create a contiguous slice of hashes to deserialize into in order to
  	// reduce the number of allocations.
  	hashes := make([]chainhash.Hash, count)
  	msg.Hashes = make([]*chainhash.Hash, 0, count)
  	for i := uint64(0); i < count; i++ {
  		hash := &hashes[i]
  		err := readElement(r, hash)
  		if err != nil {
  			return err
  		}
  		msg.AddTxHash(hash)
  	}
  
  	msg.Flags, err = ReadVarBytes(r, pver, maxFlagsPerMerkleBlock,
  		"merkle block flags size")
  	return err
  }
docs: // BtcDecode decodes r using the bitcoin protocol encoding into the receiver.
  // This is part of the Message interface implementation.