An indexer is four things and no more.
| part | job | | --- | --- | | source | ordered ledger events, replayable from any point | | cursor | the sequence number of the last event you finished | | processor | folds one event into state | | store | holds the folded state and the cursor |
The last row is the one that matters. If the cursor lives in a local variable it is a progress bar; if it lives in the same store as the data it is a checkpoint, and a checkpoint is the only thing that survives SIGKILL.
struct Store {
balances: Vec<(&'static str, i64)>,
cursor: u64,
}
