// WriteTo writes the MsgHeader into a writer.
WriteTo writes the MsgHeader into a writer.
// WriteTo writes the MsgHeader into a writer .
func (m *MsgHeader) WriteTo(w io.Writer) (int64, error) {
	b := m.ToWire()
	c, err := w.Write(b)
	n := int64(c)
	if err != nil {
		return n, err
	}
	if c != len(b) {
		return n, fmt.Errorf("attempted to write %d but wrote %d", len(b), n)
	}
	return n, nil
}
func ( m * MsgHeader ) WriteTo ( w io . Writer ) ( int64 , error ) { b := m . ToWire ( ) c , err := w . Write ( b ) n := int64 ( c ) if err != nil { return n , err } if c != len ( b ) { return n , fmt . Errorf ( " " , len ( b ) , n ) } return n , nil }
WriteTo writes the MsgHeader into a writer.
WriteTo writes the MsgHeader into a writer .