refactor: extract snapshot_balances/emit_balance_changes helpers#542
refactor: extract snapshot_balances/emit_balance_changes helpers#542xdustinface wants to merge 1 commit intov0.42-devfrom
snapshot_balances/emit_balance_changes helpers#542Conversation
To avoid cloning the same pattern in other places in other coming PRs.
📝 WalkthroughWalkthroughIntroduces two internal utility methods ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 `@key-wallet-manager/src/wallet_manager/mod.rs`:
- Around line 1024-1041: The method emit_balance_changes references
self.event_sender (which only exists under the "std" feature) causing no-std
builds to fail; fix by gating the function with #[cfg(feature = "std")] and
providing a matching #[cfg(not(feature = "std"))] no-op implementation (or
alternatively gate the parts that touch self.event_sender) so that
emit_balance_changes and uses of WalletEvent/send are only compiled when the std
feature is enabled; locate the emit_balance_changes function and the
event_sender field to apply the cfg attributes consistently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 615839af-4c59-40bb-bdee-f9af09364a50
📒 Files selected for processing (2)
key-wallet-manager/src/wallet_manager/mod.rskey-wallet-manager/src/wallet_manager/process_block.rs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.42-dev #542 +/- ##
=============================================
- Coverage 66.89% 66.87% -0.03%
=============================================
Files 313 313
Lines 64753 64763 +10
=============================================
- Hits 43317 43308 -9
- Misses 21436 21455 +19
*This pull request uses carry forward flags. Click here to find out more.
|
To avoid cloning the same pattern in other places in other coming PRs.
Summary by CodeRabbit