code: func (msg *MsgTx) SerializeSize() int {
  	n := msg.baseSize()
  
  	if msg.HasWitness() {
  		// The marker, and flag fields take up two additional bytes.
  		n += 2
  
  		// Additionally, factor in the serialized size of each of the
  		// witnesses for each txin.
  		for _, txin := range msg.TxIn {
  			n += txin.Witness.SerializeSize()
  		}
  	}
  
  	return n
  }
docs: // SerializeSize returns the number of bytes it would take to serialize the
  // the transaction.