-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment @cursor review or bugbot run to trigger another review on this PR
| format!("Invalid bundle at block: {n}") | ||
| } | ||
| crate::event_types::SlashedReason::BadExecutionReceipt(h) => { | ||
| format!("Bad execution receipt: 0x{:?}", hex::encode(h)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| fn remove_header_until(&mut self, number: BlockNumber) { | ||
| let mut to_remove = number; | ||
| while let Some(hashes) = self.block_number_hashes.remove(&to_remove) { | ||
| debug!("Removing header from cache: {number}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Debug Log: Static Number, Not Dynamic
The debug log uses {number} which is the function parameter that never changes, instead of {to_remove} which is the actual block number being removed in each loop iteration. This causes all log messages in the loop to show the same number rather than the actual number being removed.
| enacted, | ||
| retracted: retracted.into_iter().rev().collect(), | ||
| common_block: tree_route.common_block().clone(), | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Data Truncation Impacts Reorg Alerts
The enacted vector has its last element removed by pop() on line 287, then the mutated vector (missing the current best block) is moved into ReorgData on line 297. This causes reorg alerts to report incomplete information, missing the latest enacted block from the reorg data.
No description provided.