fix: Break loop on invalid chainsync response#96
fix: Break loop on invalid chainsync response#96gonzalezzfelipe wants to merge 2 commits intotxpipe:mainfrom
Conversation
📝 WalkthroughWalkthroughThe chainsync driver's handling of a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@balius-runtime/src/drivers/chainsync.rs`:
- Around line 59-62: The log message in chainsync.rs is misleading: change the
tracing::error!("Received None response from follow_tip, skipping") call to
reflect that the function is aborting/returning an error (e.g., "Received None
response from follow_tip, aborting") so the runtime behavior of follow_tip
(which immediately returns Err(Error::Driver(...))) matches the log; update the
log text near the follow_tip handling to accurately state abort/return instead
of "skipping".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
balius-runtime/src/drivers/chainsync.rs (1)
6-6: Optional: importerroralongsideinfoandwarnfor consistency.
tracing::error!on line 59 uses the full path whileinfoandwarnare imported directly. Consider pullingerrorinto the same import.♻️ Proposed fix
-use tracing::{info, warn}; +use tracing::{error, info, warn};Then on line 59:
- tracing::error!("Received None response from follow_tip"); + error!("Received None response from follow_tip");🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@balius-runtime/src/drivers/chainsync.rs` at line 6, The import currently pulls in info and warn only; add error to the same tracing import (use tracing::{info, warn, error};) and replace the full-path usage tracing::error! in the chainsync code with the imported error! macro so all tracing macros are consistently imported (locate the tracing::error! call and change it to error!).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@balius-runtime/src/drivers/chainsync.rs`:
- Line 6: The import currently pulls in info and warn only; add error to the
same tracing import (use tracing::{info, warn, error};) and replace the
full-path usage tracing::error! in the chainsync code with the imported error!
macro so all tracing macros are consistently imported (locate the
tracing::error! call and change it to error!).
Summary by CodeRabbit