-
Notifications
You must be signed in to change notification settings - Fork 404
Clean up docs in keysinterface.rs
#1892
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
Clean up docs in keysinterface.rs
#1892
Conversation
53eab2b
to
b579852
Compare
lightning/src/chain/keysinterface.rs
Outdated
pub channel_keys_id: [u8; 32], | ||
/// The value of the channel which this transactions spends. | ||
/// The value of the channel which this transaction spends. |
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.
"The value of the funding channel output spent by this commitment transaction. This may be useful in re-deriving keys used in the channel to spend the output". This value isn't consumed directly by the signature digest as the output spent is a to_remote
on a counterparty commitment transaction.
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.
Now went with "The value of the funding channel output which this transaction spends." to keep it concise. Let me know if that's fine by you.
Codecov ReportBase: 90.60% // Head: 91.06% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1892 +/- ##
==========================================
+ Coverage 90.60% 91.06% +0.45%
==========================================
Files 91 91
Lines 48656 51205 +2549
Branches 48656 51205 +2549
==========================================
+ Hits 44087 46632 +2545
- Misses 4569 4573 +4
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
b749d60
to
afeb894
Compare
Rebased after #1867 got merged. |
#[derive(Clone, Debug, PartialEq, Eq)] | ||
pub struct DelayedPaymentOutputDescriptor { | ||
/// The outpoint which is spendable | ||
/// The outpoint which is spendable. |
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 isn't a fully-formed valid sentence, not sure why its getting a period? Same goes for a number of later things.
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, while it stands out in this case because the line is so short, I still think it should have a period, in particular to maintain consistency with other examples with longer lines, in which we def. want a period. E.g.:
/// An output to a P2WPKH, spendable exclusively by our payment key (i.e., the private key
/// which corresponds to the `payment_point` in [`BaseSign::pubkeys`]). The witness
/// in the spending input is, thus, simply:
lightning/src/chain/keysinterface.rs
Outdated
pub channel_keys_id: [u8; 32], | ||
/// The value of the channel which this transactions spends. | ||
/// The value of the funding channel output which this transaction spends. |
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 find "the funding channel output" substantially more confusing than "the channel". Its now much easier to get confused and think this is the value in the output, but its really the value of the channel.
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 tend to agree, a change in this direction was however suggested in #1892 (comment).
@ariard, are you fine with me reverting this?
afeb894
to
47c98c1
Compare
Rebased again after #1825 got merged. |
c6580ac
to
d6cd997
Compare
Feel free to squash, IMO. With some resolution on #1892 (comment) I'm happy with this I think. |
d6cd997
to
bcb1f04
Compare
Squashed with the reverted version. @ariard let me know if you ACK. |
6d49c17
to
350e8a1
Compare
Squashed again with requested changes. |
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.
Note this will conflict a bit with #1910 so it'd be nice to land this soon.
350e8a1
to
03de059
Compare
Squashed again with changes:
|
/// [`KeysInterface::derive_channel_signer`]. The `user_channel_id` is provided to allow | ||
/// implementations of `KeysInterface` to maintain a mapping between it and the generated | ||
/// `channel_keys_id`. | ||
/// Get a new set of [`Sign`] for per-channel secrets. These MUST be unique even if you |
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 doc makes much less sense to me than the previous one. We're not generating a "set" here, I think, and we should make explicit reference to derive_channel_signer
.
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.
Ah it seems like this came from a rebase. We want to keep the docs as they currently are in main
.
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.
Let's just revert it in a followup, since this is blocking other stuff.
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 do it in #1903 since that will need rebase on this anyway.
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.
One comment but otherwise definitely looks good. Also happy to address it in a followup.
Started off when I found some room for improvement in the docs of
SpendableOutputDescriptor
, took me down the rabbit hole of "since I'm already here"...Hope this doesn't have too many conflicts with #1867 (but if I see correctly, it shouldn't)...