2045 - fix rollback tests #2049
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes #2045 #2050
Fixed two bugs in db-sync:
Bug 1: ChainSync client hang after genesis fallback
After re-intersecting at genesis, clientTip wasn't reset to Origin, causing the pipeline policy to think the client was ahead of the server and stop requesting blocks.
Fix: Reset clientTip to Origin when re-intersecting at genesis.
Bug 2: Missing database fallback for intersection points
When no ledger state snapshots are available after restart, getLatestPoints had no intersection points to sync from.
Fix: Query database for recent blocks when no snapshots are available.
Checklist
fourmoluon version 0.17.0.0 (which can be run withscripts/fourmolize.sh)Migrations
If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.