func (msg *MsgBlock) Serialize(w io.Writer) error {
	// At the current time, there is no difference between the wire encoding
	// at protocol version 0 and the stable long-term storage format.  As
	// a result, make use of BtcEncode.
	//
	// Passing WitnessEncoding as the encoding type here indicates that
	// each of the transactions should be serialized using the witness
	// serialization structure defined in BIP0141.
	return msg.BtcEncode(w, 0, WitnessEncoding)
}
// Serialize encodes the block to w using a format that suitable for long-term
// storage such as a database while respecting the Version field in the block.
// This function differs from BtcEncode in that BtcEncode encodes the block to
// the bitcoin wire protocol in order to be sent across the network.  The wire
// encoding can technically differ depending on the protocol version and doesn't
// even really need to match the format of a stored block at all.  As of the
// time this comment was written, the encoded block is the same in both
// instances, but there is a distinct difference and separating the two allows
// the API to be flexible enough to deal with changes.
Serialize encodes the block to w using a format that suitable for long-term
storage such as a database while respecting the Version field in the block.
This function differs from BtcEncode in that BtcEncode encodes the block to
the bitcoin wire protocol in order to be sent across the network.  The wire
encoding can technically differ depending on the protocol version and doesn't
even really need to match the format of a stored block at all.  As of the
time this comment was written, the encoded block is the same in both
instances, but there is a distinct difference and separating the two allows
the API to be flexible enough to deal with changes.
// Serialize encodes the block to w using a format that suitable for long - term // storage such as a database while respecting the Version field in the block . // This function differs from BtcEncode in that BtcEncode encodes the block to // the bitcoin wire protocol in order to be sent across the network . The wire // encoding can technically differ depending on the protocol version and doesn ' t // even really need to match the format of a stored block at all . As of the // time this comment was written the encoded block is the same in both // instances but there is a distinct difference and separating the two allows // the API to be flexible enough to deal with changes .
func (msg *MsgBlock) Serialize(w io.Writer) error {
	 Passing WitnessEncoding as the encoding type here indicates that
	 each of the transactions should be serialized using the witness
	 serialization structure defined in BIP0141.
	return msg.BtcEncode(w, 0, WitnessEncoding)
}
func ( msg * MsgBlock ) Serialize ( w io . Writer ) error { return msg . BtcEncode ( w , 0 , WitnessEncoding ) }
Serialize encodes the block to w using a format that suitable for long-term
storage such as a database while respecting the Version field in the block.
Serialize encodes the block to w using a format that suitable for long - term storage such as a database while respecting the Version field in the block .
// At the current time, there is no difference between the wire encoding // at protocol version 0 and the stable long-term storage format.  As // a result, make use of BtcEncode. // // Passing WitnessEncoding as the encoding type here indicates that // each of the transactions should be serialized using the witness // serialization structure defined in BIP0141.