optakt / flow-dps

Flow Data Provisioning Service
Apache License 2.0
29 stars 13 forks source link

Resume incorrectly sets the first height #475

Closed Maelkum closed 3 years ago

Maelkum commented 3 years ago

When resuming indexing from a previous state, the indexer writes new first height in the index.

For example, if we first indexed blocks 0-100, then in the next run the indexer resumes from the 101st block, it will, by the looks of it in the ForwardHeight function, set that as the first block.

Even though in the index there will be blocks e.g. 0-200, the first and last will indicate range of 101 to 200.