exocore
exocore copied to clipboard
Index should fail to mutate until data is ready
Since the data layer may never be ready, until we persist the pending store, we should fail mutations as long as the data layer is not ready (i.e. synchronized with rest of nodes).
Course of action:
- In chain layer, emit chain & pending sync events (synced, unsynced)
- Use those events in store to know if chain was ready, and not return mutations until they are?
Question
- Is this even necessary if we just defaults the mutation await to true? Could be for performance
- Think about the fact that we may want to add possibility of throttling the mutations based on pending store's current size at some point