Small cleanups to slowjam attack - #134
Merged
Merged
Conversation
The jamming interceptor only removed the payment from `jamming_payments` on the sleep (hold-time-elapsed) arm of the select. On the shutdown arm it returned without removing, leaving the entry behind. `run_attack`'s teardown loop waits for that set to drain, so a shutdown that landed while a payment was held would leave the loop spinning on a set that could never empty. Move the removal after the select so both the hold-time and shutdown paths untrack the payment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The teardown loop bound the `jamming_payments` guard to the whole loop body, so it held the mutex across the 5-minute `clock.sleep`. It also had no shutdown exit, relying solely on the set draining. Scope the lock to just the `is_empty` check so the guard drops before the sleep, and add a shutdown arm to the wait so the loop exits promptly on teardown instead of polling against a set that may not drain. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
Trivial cleanups, merged without review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Investigating hanging issue from virtual clock, some low hanging fruit which I believe may be causing the sim to hang.