code: func spentTxOutSerializeSize(stxo *SpentTxOut) int {
  	size := serializeSizeVLQ(spentTxOutHeaderCode(stxo))
  	if stxo.Height > 0 {
  		// The legacy v1 spend journal format conditionally tracked the
  		// containing transaction version when the height was non-zero,
  		// so this is required for backwards compat.
  		size += serializeSizeVLQ(0)
  	}
  	return size + compressedTxOutSize(uint64(stxo.Amount), stxo.PkScript)
  }
docs: // spentTxOutSerializeSize returns the number of bytes it would take to
  // serialize the passed stxo according to the format described above.