lightningdevkit / rust-lightning

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

Move `BlindedPayInfo` into `BlindedPaymentPath` #3245

Closed valentinewallace closed 3 months ago

valentinewallace commented 3 months ago

Rather than a BOLT 12 invoice's paths containing tuples of (BlindedPayInfo, BlindedPaymentPath), move the payinfo into the path itself.

valentinewallace commented 3 months ago

Rebased.

valentinewallace commented 3 months ago

Sorry, one more rustfmt + fuzz fix to push.

valentinewallace commented 3 months ago

And one more doc test :(


diff --git a/lightning/src/offers/invoice.rs b/lightning/src/offers/invoice.rs
index d361c7ce4..40ee40090 100644
--- a/lightning/src/offers/invoice.rs
+++ b/lightning/src/offers/invoice.rs
@@ -29,8 +29,8 @@
 //! use lightning::util::ser::Writeable;
 //!
 //! # use lightning::ln::types::PaymentHash;
-//! # use lightning::offers::invoice::{BlindedPayInfo, ExplicitSigningPubkey, InvoiceBuilder};
-//! # use lightning::blinded_path::payment::BlindedPaymentPath;
+//! # use lightning::offers::invoice::{ExplicitSigningPubkey, InvoiceBuilder};
+//! # use lightning::blinded_path::payment::{BlindedPayInfo, BlindedPaymentPath};
 //! #
 //! # fn create_payment_paths() -> Vec<BlindedPaymentPath> { unimplemented!() }
 //! # fn create_payment_hash() -> PaymentHash { unimplemented!() }
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 97.29730% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.69%. Comparing base (fb4403f) to head (4ef83a0). Report is 4 commits behind head on main.

Files Patch % Lines
lightning/src/blinded_path/payment.rs 88.57% 1 Missing and 3 partials :warning:
lightning/src/offers/invoice.rs 95.65% 0 Missing and 1 partial :warning:
lightning/src/util/ser.rs 80.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3245 +/- ## ========================================== - Coverage 89.69% 89.69% -0.01% ========================================== Files 125 125 Lines 102794 102801 +7 Branches 102794 102801 +7 ========================================== + Hits 92206 92210 +4 - Misses 7869 7874 +5 + Partials 2719 2717 -2 ```

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