* EventIndex: add some documentation ... because comments are not subject to rationing. * EventIndex: rationalise addInitialCheckpoints logic * EventIndex: improve logging * use a single `logger` instance to do the prefixing * use `JSON.stringify` on the checkpoints so that the rageshakes are useful * distinguish between logger.warn and logger.debug * emit some logs if the crawler loop fails * Move check for empty database to `init` The problem with checking if the database is empty in `onSync` is that, by the time we get there, it won't be. Instead let's remember if the db was empty in `init`, and then once a sync completes, we can add the checkpoints. * Some tests for EventIndexer
7.5 KiB
7.5 KiB