-
Notifications
You must be signed in to change notification settings - Fork 436
Add AChainMonitor trait and use it in background processor #4371
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
|
👋 Thanks for assigning @TheBlueMatt as a reviewer! |
620fc4b to
9c9c9b3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4371 +/- ##
==========================================
+ Coverage 85.99% 86.01% +0.01%
==========================================
Files 156 156
Lines 102766 102781 +15
Branches 102766 102781 +15
==========================================
+ Hits 88378 88409 +31
+ Misses 11879 11864 -15
+ Partials 2509 2508 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b99f6ee to
0a38e48
Compare
Add a new `AChainMonitor` trait following the same pattern as `AChannelManager`. This trait provides associated types for all generic parameters of `ChainMonitor` and a `get_cm()` method to access the underlying `ChainMonitor`. Update the background processor to use `AChainMonitor` trait bounds instead of spelling out the full `ChainMonitor` generic parameters. This simplifies the function signatures by removing 5-6 explicit generic parameters (CF, T, F, P, ES) per function. This is preparation for adding a flush method to the AChainMonitor trait. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0a38e48 to
4800a47
Compare
|
Verified that this is indeed going to work with deferred writes (#4317) and ldk-node integration (lightningdevkit/ldk-node#782) |
TheBlueMatt
left a comment
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.
Cool thanks!
|
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
|
Eh, just gonna merge this even though it "broke" semver. but semver is already broken cause BP depends on |
Add a new
AChainMonitortrait following the same pattern asAChannelManager. This trait provides associated types for all generic parameters ofChainMonitorand aget_cm()method to access the underlyingChainMonitor.Update the background processor to use
AChainMonitortrait bounds instead of spelling out the fullChainMonitorgeneric parameters. This simplifies the function signatures by removing 5-6 explicit generic parameters (CF, T, F, P, ES) per function.This is preparation for adding a flush method to the AChainMonitor trait.