We knew that this edgy case could happend, and it is time to check for the best solution to fix it.
Since we would have to iter through the entire database to see which peers had the connected flag enabled, I propose to register from all the peers in the peerstore which was the time of the last connection/disconnection event. This way, we would know when was the last moment when we are sure that the crawler was active, without adding/exporting extra info.
What do you think about it @alrevuelta @tarun96T ?
I think that we could iterate from the last NegativeConnectionAttempts of each of the peers to accourately guess when did the crawler disconnect/crashed.
We knew that this edgy case could happend, and it is time to check for the best solution to fix it.
Since we would have to iter through the entire database to see which peers had the connected flag enabled, I propose to register from all the peers in the peerstore which was the time of the last connection/disconnection event. This way, we would know when was the last moment when we are sure that the crawler was active, without adding/exporting extra info.
What do you think about it @alrevuelta @tarun96T ?