code: func (msg *MsgCFCheckpt) BtcEncode(w io.Writer, pver uint32, _ MessageEncoding) error {
  	// Write filter type
  	err := writeElement(w, msg.FilterType)
  	if err != nil {
  		return err
  	}
  
  	// Write stop hash
  	err = writeElement(w, msg.StopHash)
  	if err != nil {
  		return err
  	}
  
  	// Write length of FilterHeaders slice
  	count := len(msg.FilterHeaders)
  	err = WriteVarInt(w, pver, uint64(count))
  	if err != nil {
  		return err
  	}
  
  	for _, cfh := range msg.FilterHeaders {
  		err := writeElement(w, cfh)
  		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.