code: func (msg *MsgTx) baseSize() int {
  	// Version 4 bytes + LockTime 4 bytes + Serialized varint size for the
  	// number of transaction inputs and outputs.
  	n := 8 + VarIntSerializeSize(uint64(len(msg.TxIn))) +
  		VarIntSerializeSize(uint64(len(msg.TxOut)))
  
  	for _, txIn := range msg.TxIn {
  		n += txIn.SerializeSize()
  	}
  
  	for _, txOut := range msg.TxOut {
  		n += txOut.SerializeSize()
  	}
  
  	return n
  }
docs: // baseSize returns the serialized size of the transaction without accounting
  // for any witness data.