-
Notifications
You must be signed in to change notification settings - Fork 403
Add more information to OpenChannelRequest Event #3019
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3019 +/- ##
==========================================
- Coverage 89.80% 89.73% -0.07%
==========================================
Files 122 122
Lines 101621 101634 +13
Branches 101621 101634 +13
==========================================
- Hits 91261 91206 -55
- Misses 7674 7730 +56
- Partials 2686 2698 +12 ☔ View full report in Codecov by Sentry. |
Msrv strikes again 😭 |
lightning/src/events/mod.rs
Outdated
/// True if this channel is (or will be) publicly-announced. | ||
is_public: bool, | ||
/// Opening fields for the channel given by the counterparty. | ||
open_fields: msgs::CommonOpenChannelFields, |
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.
Mh, if we want to do this, I wonder if we should drop the channel_type
field as it's redundant.
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.
I don't think so, channel type is calculated through a function above, eaiser to give that to the user so they don't need to calculate themselves
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.
I mean if we want to do that we should just (finally) require channel type features and then its never negotiated but rather we always use what is in the message :).
That said, there's a lot of extra crap here...I'm fairly confident users don't care about the basepoints of the channel, the temporary_channel_id is redundant, and the chain hash is always matching (cause we check it in LDK). ISTM this is being included primarily for the numerical fields (dust limit, max in-flight value, htlc min, initial feerate, to-self delay and max HTLCs), which makes sense, but its a bit annoying to shove a lot of additional data in here.
Can we instead add like a ChannelParameters
struct which contains just these? Can be a part of the wire message struct or a standalone one for the event.
Btw, we should also look into allowing acting on any of these fields soon, see #2914 |
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.
I'll probably do a pass at improving the docs, but this is fine as-is. Gonna go ahead and merge it, though, since its quite simple and there wasn't any other feedback on the API changes in the last round.
/// The feerate for the commitment transaction set by the channel initiator until updated by | ||
/// [`UpdateFee`] | ||
pub commitment_feerate_sat_per_1000_weight: u32, | ||
/// The number of blocks which the counterparty will have to wait to claim on-chain funds if they |
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.
This is somewhat confusing in context - for an inbound channel this is the amount of blocks that we'll have to wait.
Noticed it was missing
is_public
and figured could just add all the fields since this isn't serialized.