hffix icon indicating copy to clipboard operation
hffix copied to clipboard

Let's rewrite the checks in message_reader::init()

Open Roman-Koshelev opened this issue 4 years ago • 6 comments

  1. Strengthen the checks (for example, check that the separating symbol is '='
  2. We will detect invalid messages as soon as possible

Roman-Koshelev avatar Apr 11 '21 18:04 Roman-Koshelev

TODO

  1. Add checks that tags are numbers
  2. Add a check that each tag has a corresponding value (and remove this check from the iterator increment)
  3. Add hash sum check

Roman-Koshelev avatar Apr 11 '21 18:04 Roman-Koshelev

Reviewing...

jamesdbrock avatar Apr 12 '21 05:04 jamesdbrock

TODO

  1. Add checks that tags are numbers

Yeah that's probably a good idea. I used to think that this was a waste of CPU cycles but I've changed my mind.

  1. Add a check that each tag has a corresponding value (and remove this check from the iterator increment)

I think it's already true that if a tag has no corresponding value, then the message will be considered invalid?

  1. Add hash sum check

What kind of hash sum check? We already have the FIX checksum.

jamesdbrock avatar Apr 12 '21 06:04 jamesdbrock

  1. The checksum we do not verify (

Roman-Koshelev avatar Apr 12 '21 07:04 Roman-Koshelev

Update

Roman-Koshelev avatar Apr 12 '21 09:04 Roman-Koshelev

  1. The checksum we do not verify (

We have the option to verify the checksum though. We leave it to the library user to decide if they want to verify the checksum. https://jamesdbrock.github.io/hffix/classhffix_1_1message__reader.html#ad3d5b61394355c230321018cdc38a57b

jamesdbrock avatar Apr 17 '21 09:04 jamesdbrock