jamesdbrock / hffix

Financial Information Exchange Protocol C++ Library
http://jamesdbrock.github.io/hffix
Other
276 stars 89 forks source link

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

Open Roman-Koshelev opened 3 years ago

Roman-Koshelev commented 3 years ago

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

Roman-Koshelev commented 3 years ago

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

jamesdbrock commented 3 years ago

Reviewing...

jamesdbrock commented 3 years ago

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.

Roman-Koshelev commented 3 years ago

3) The checksum we do not verify (

Roman-Koshelev commented 3 years ago

Update

jamesdbrock commented 3 years ago
  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