Make it so that when msg_wrap objects are in a std::priority_queue, messages with a smaller epoch number always come first. Then, within an epoch, messages are ordered by their sequence number (so smaller first there as well).
| 255 | // epoch, messages are ordered by their sequence number (so smaller first |
| 256 | // there as well). |
| 257 | bool operator<(const msg_wrap& item) const |
| 258 | { |
| 259 | if (data.epoch < item.data.epoch) |
| 260 | { |
| 261 | return false; |
| 262 | } |
| 263 | else if (data.epoch > item.data.epoch) |
| 264 | { |
| 265 | return true; |
| 266 | } |
| 267 | else |
| 268 | { |
| 269 | if (sequence_number < item.sequence_number) |
| 270 | return false; |
| 271 | else |
| 272 | return true; |
| 273 | } |
| 274 | } |
| 275 | }; |
| 276 | |
| 277 | public: |
nothing calls this directly
no outgoing calls
no test coverage detected