UpdateChainTip action is now called after enhance instead of download. This action decides if 10min threshold passed so chain tip must be updated and afterwards the sync "restarted". So far this continuation is done and seems to work but there might be hidden thing - ClearCache is not called and I wonder if sync can get into some inconsistent or even broken state. Why?
Scenario:
There's a chainTip scan range, let's say 200k blocks. If 10mins is hit during this range sync, it will probably be somewhere inside it, some blocks are downloaded, blockDownloader is working in parallel, some blocks are scanned.. The State Machine is done in a way that heavily depends on ClearCache being called with every range run. Right now it's not doing the ClearCache with these (and every) 10mins "restarts".
When tested the mainnet sync, I got to 70% with no issues. When I tried the same with testnet, sync failed with following error. May be connected to this issue.
UpdateChainTip action is now called after enhance instead of download. This action decides if 10min threshold passed so chain tip must be updated and afterwards the sync "restarted". So far this continuation is done and seems to work but there might be hidden thing - ClearCache is not called and I wonder if sync can get into some inconsistent or even broken state. Why?
Scenario: There's a chainTip scan range, let's say 200k blocks. If 10mins is hit during this range sync, it will probably be somewhere inside it, some blocks are downloaded, blockDownloader is working in parallel, some blocks are scanned.. The State Machine is done in a way that heavily depends on ClearCache being called with every range run. Right now it's not doing the ClearCache with these (and every) 10mins "restarts".
This needs to be double-checked.