The chainsync did not handle the possibility of decreasing latest-head numbers on the unsafe head stream (reorgs).
Now, it indicates a reorg by first only calling the unsafe-head handler with the parent block of the newly re-orged latest head. This way a client can recognise a reorg, roll back all relevant state, and then still handle the events of the new latest head.
Additionally, the syncing mechanism for specific sync-start blocks was fixed.
The chainsync did not handle the possibility of decreasing latest-head numbers on the unsafe head stream (reorgs). Now, it indicates a reorg by first only calling the unsafe-head handler with the parent block of the newly re-orged latest head. This way a client can recognise a reorg, roll back all relevant state, and then still handle the events of the new latest head.
Additionally, the syncing mechanism for specific sync-start blocks was fixed.