1. Add a function that should check the pairing of events in blocks (Offline must be followed by Live, etc.):
Note: this function is to be used only to find valid pairs of existing blocks from the cache, i.e. don't use it for validation of an existing data chain because you can have a Rejoin event that doesn't have any pair.
2. Make sure that new blocks are inserted into the chain only when is_valid_pair returns true (except for Rejoin).