fix(eth/downloader): fix flaky test TestFakedSyncProgress64Full#2320
fix(eth/downloader): fix flaky test TestFakedSyncProgress64Full#2320gzliudan wants to merge 1 commit intoXinFinOrg:dev-upgradefrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates a downloader sync-progress regression test to correctly model an attacker peer that advertises a higher height than it can actually serve, ensuring the progress “tail gap” reduction matches the test’s expectation.
Changes:
- Adjusted the attacker chain’s tail-header deletion loop to remove the missing range inclusively (fixing an off-by-one in the simulated gap).
- Added clarifying comments explaining the intended height convergence after the attack is detected.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Make the mocked attacker remove the missing tail headers inclusively so the advertised height reduction matches the test expectation.
8e921a2 to
dd12bf5
Compare
Proposed changes
Make the mocked attacker remove the missing tail headers inclusively so the advertised height reduction matches the test expectation.
Types of changes
What types of changes does your code introduce to XDC network?
Put an
✅in the boxes that applyImpacted Components
Which parts of the codebase does this PR touch?
Put an
✅in the boxes that applyChecklist
Put an
✅in the boxes once you have confirmed below actions (or provide reasons on not doing so) that