Skip to content

fix: resolve timer leaks and logical errors in Manager and test utilities#4442

Closed
Newt6611 wants to merge 3 commits intoOffchainLabs:masterfrom
Newt6611:fix-revalidation-test-timeout
Closed

fix: resolve timer leaks and logical errors in Manager and test utilities#4442
Newt6611 wants to merge 3 commits intoOffchainLabs:masterfrom
Newt6611:fix-revalidation-test-timeout

Conversation

@Newt6611
Copy link
Copy Markdown

@Newt6611 Newt6611 commented Mar 1, 2026

Key Changes:

  • Fix Timeout Logic: In waitForBlocksToCatchup, moved time.After outside the for loop. According to the function comment, it is intended to prevent "running this function forever", but the previous implementation reset the timer on every iteration, making the limit ineffective.
  • Fix Interval & Resource Leak: In Manager.go, replaced time.After with the existing ticker.C.
    • Ensures tickAtInterval follows the intended 12s interval (was 1s).
    • Prevents memory/timer leaks from creating new channels inside the loop.

Newt6611 added 2 commits March 2, 2026 04:23
Move time.After(limit) outside the for loop so the timeout channel is
created once rather than being re-created on every iteration, which
caused the timeout to never fire and leaked timers.
Replace time.After(time.Second) with ticker.C in tickAtInterval and
fastTickWhileCatchingUp to avoid creating a new timer on every loop
iteration.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 1, 2026

CLA assistant check
All committers have signed the CLA.

@gligneul gligneul added the trivial Adding this tag auto-closes trivial PRs politely. label Mar 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Thank you for your contribution. However, this PR has been automatically closed because it was labeled as trivial. As stated in our CONTRIBUTING.md:


Important

Please, do not send pull requests for trivial changes; these will be rejected.
These types of pull requests incur a cost to reviewers and do not provide much value to the project.
If you are unsure, please open an issue first to discuss the change.
Here are some examples of trivial PRs that will most-likely be rejected:

  • Fixing typos
  • AI-generated code
  • Refactors that don't improve usability

We appreciate meaningful contributions!

@github-actions github-actions Bot closed this Mar 4, 2026
@Newt6611 Newt6611 deleted the fix-revalidation-test-timeout branch March 5, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

trivial Adding this tag auto-closes trivial PRs politely.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants