-
Notifications
You must be signed in to change notification settings - Fork 385
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
Allow get_shutdown_scriptpubkey and get_destination_script to return an Error #2213
Allow get_shutdown_scriptpubkey and get_destination_script to return an Error #2213
Conversation
76b903b
to
b8476a5
Compare
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #2213 +/- ##
==========================================
- Coverage 91.56% 91.55% -0.02%
==========================================
Files 104 104
Lines 51548 51567 +19
Branches 51548 51567 +19
==========================================
+ Hits 47199 47210 +11
- Misses 4349 4357 +8
☔ View full report in Codecov by Sentry. |
We should clearly document both in the channel open method on |
Somewat related, #2214. |
b8476a5
to
134b865
Compare
@TheBlueMatt added some docs |
134b865
to
46a36d8
Compare
46a36d8
to
b0ddf31
Compare
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.
LGTM
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.
LGTM, just a question on docs
lightning/src/ln/channelmanager.rs
Outdated
@@ -2098,6 +2101,11 @@ where | |||
/// | |||
/// May generate a [`SendShutdown`] message event on success, which should be relayed. | |||
/// | |||
/// Raises [`APIError::ChannelUnavailable`] if the channel cannot be closed due to failing to | |||
/// generate a shutdown scriptpubkey or destination script set by | |||
/// [`SignerProvider::get_shutdown_scriptpubkey`] and [`SignerProvider::get_destination_script`]. |
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.
IIUC I don't think SignerProvider::destination_script
is used when closing?
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.
good catch, fixed some of the docs
b0ddf31
to
39ace7e
Compare
39ace7e
to
0b8bdbf
Compare
There are tons of cases where you can get an error when generating an address and it would be nice if LDK handled that. I did this in the simplest way of just making the error type
()
, not sure if it'd be better to add a special error type here and implementors can return as it seems like just using()
was sufficient.