If a local regular event is added but the cache isn't updated, then when we make a merge event, we may omit a regular event that is pending. This would be a serious failure (as we cannot include it later because it is a protocol violation to do so) -- we'd have to regenerate the event and assign it the appropriate (new) merge event parent. That would be a mess, so instead, we should guarantee that localChildlessHashes (or whatever we use to select all pending regular events to create parent hashes for the next merge event) must not get corrupted/must be repaired.
We have a FIXME here that needs to be addressed:
https://github.com/digitalbazaar/bedrock-ledger-consensus-continuity/blob/aa57ff6692561edd01c0b90a1269e773252ed1dd/lib/events.js#L530-L538
If a local regular event is added but the cache isn't updated, then when we make a merge event, we may omit a regular event that is pending. This would be a serious failure (as we cannot include it later because it is a protocol violation to do so) -- we'd have to regenerate the event and assign it the appropriate (new) merge event parent. That would be a mess, so instead, we should guarantee that
localChildlessHashes
(or whatever we use to select all pending regular events to create parent hashes for the next merge event) must not get corrupted/must be repaired.