lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.17k stars 368 forks source link

Support async signing for V2 channel establishment #3411

Open jkczyz opened 2 weeks ago

jkczyz commented 2 weeks ago

When handling a tx_complete message, allow signers to return an error indicating that the signer has not yet complete. This will leave the ChannelPhase in an unfunded variant until the signer becomes unblocked. The user calls ChannelManager::signer_unblocked to indicate that signing is complete, which will attempt to finish handling the tx_complete message again.

Based on #3137. Fixes #3404.

jkczyz commented 1 week ago

Fixed a couple rustfmt issues in dual_funding_tests.rs. Also, removed a ton of unnecessary drains from channelmanager.rs for good measure since I was looking at related code and noticed a Vec wasn't being used, which I removed in another commit, too.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 66.91176% with 45 lines in your changes missing coverage. Please review.

Project coverage is 89.23%. Comparing base (0c31021) to head (6db89d7).

Files with missing lines Patch % Lines
lightning/src/ln/channelmanager.rs 64.61% 16 Missing and 7 partials :warning:
lightning/src/ln/channel.rs 62.50% 20 Missing and 1 partial :warning:
lightning/src/ln/interactivetxs.rs 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3411 +/- ## ========================================== + Coverage 89.22% 89.23% +0.01% ========================================== Files 130 130 Lines 106965 106958 -7 Branches 106965 106958 -7 ========================================== + Hits 95438 95446 +8 + Misses 8734 8725 -9 + Partials 2793 2787 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: