refactor(blockchain): drop SyncStatusTracker::gate_proposer#449
refactor(blockchain): drop SyncStatusTracker::gate_proposer#449MegaRedHand wants to merge 1 commit into
Conversation
f9d9603 to
f8d6ec2
Compare
🤖 Kimi Code ReviewOverall Assessment: This is a clean refactoring that removes unnecessary abstraction without changing behavior. No security or correctness issues introduced. Detailed Feedback:
Consensus Safety Check:
Minor Style Note:
Verdict: LGTM. The refactoring reduces API surface area and improves code clarity. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Claude Code ReviewHere is my review of PR #449: PR #449:
|
🤖 Codex Code ReviewNo findings.
I could not run the targeted Rust tests in this environment: Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
gate_proposer was a one-line wrapper over duties_allowed() with a single call site. Inline it at the call site as scheduled_proposer.filter(|_| duties_allowed()) and drop the method, so the sync gate is expressed the same way everywhere. Behavior unchanged. Its three dedicated tests asserted duties_allowed() alongside the removed method; since duties_allowed() is just !syncing and the update()-based tests already cover that bit, they were duplicates and are removed.
f8d6ec2 to
9e43879
Compare
Split out of #445 (proposer pre-build).
gate_proposerwas a one-line wrapper overduties_allowed()with a single call site. This inlines it asscheduled_proposer.filter(|_| self.sync_status.duties_allowed())and removes the method, so the sync gate reads the same way everywhere.Behavior-preserving —
proposer_validator_idis computed identically; every downstream use (the skip-while-syncing log, thestore::on_tickproposal flag, the proposal call) is untouched.The three
gate_proposer-only unit tests collapse onto theduties_allowed()assertions they already made.Stacked under the on_tick-regrouping PR; #445 will drop these hunks once both land.