chore: refactor redundant interval creation#694
Merged
KolbyML merged 10 commits intoReamLabs:masterfrom Aug 13, 2025
Merged
Conversation
syjn99
approved these changes
Aug 12, 2025
Contributor
|
feel free to merge this when CI is fixed! |
2 tasks
KolbyML
reviewed
Aug 13, 2025
Contributor
KolbyML
left a comment
There was a problem hiding this comment.
Overall this PR looks good just rebase and apply the few suggestions
Comment on lines
20
to
26
| let mut interval = interval_at( | ||
| interval_start, | ||
| Duration::from_secs(seconds_per_slot / INTERVALS_PER_SLOT), | ||
| ); | ||
| interval.set_missed_tick_behavior(MissedTickBehavior::Burst); | ||
|
|
||
| Ok(interval) |
Contributor
There was a problem hiding this comment.
might as well inline all these into the ok
Contributor
Author
There was a problem hiding this comment.
Can't inline this because set missed tick behavior is called on the interval after creation
4b5b61a to
ef51d13
Compare
allnil
pushed a commit
to loadnetwork/ream
that referenced
this pull request
Aug 18, 2025
* chore: refactor redundant interval creation * fix: imports * fix: import * fix: unhide error * fix: handle err * fix: pass up the err * fix: inline requested * fix: cleanup * fix: inline * fix: format
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.
What was wrong?
Fixes: #683
How was it fixed?
Refactored the interval code by creating a function create_lean_clock_interval() which returns an interval to be used in both
ValidatorServiceandLeanChainService.To-Do