Event order should be the order the tx was processed, not completed

Event IDs should be kept in order in which txs are processed, instead of order of when txs are complete. We shouldn't have a concept of incomplete/complete events, just pending/successful/fail/refund/etc.

The reason being that if someone were to replay the events in order, they should get the exact state of thorchain at that moment. Because we tend to emit events for staking events (because they complete immediately, no outbound tx), it changes the math of XYK and Midgard can have bad data.

Edited Dec 09, 2019 by Son of Odin
Assignee Loading
Time tracking Loading