Merge pull request #2511 from jbesraa/add-channel-id-to-spendableoutputs-event
[rust-lightning] / lightning / src / routing / router.rs
index 3419f122e7ddfa907ffde3b44c2ee89f47ca6518..543202f41370a7fe0e15e472cae345bdc808c200 100644 (file)
@@ -652,11 +652,12 @@ impl PaymentParameters {
        /// [`PaymentParameters::expiry_time`].
        pub fn from_bolt12_invoice(invoice: &Bolt12Invoice) -> Self {
                Self::blinded(invoice.payment_paths().to_vec())
-                       .with_bolt12_features(invoice.features().clone()).unwrap()
+                       .with_bolt12_features(invoice.invoice_features().clone()).unwrap()
                        .with_expiry_time(invoice.created_at().as_secs().saturating_add(invoice.relative_expiry().as_secs()))
        }
 
-       fn blinded(blinded_route_hints: Vec<(BlindedPayInfo, BlindedPath)>) -> Self {
+       /// Creates parameters for paying to a blinded payee from the provided blinded route hints.
+       pub fn blinded(blinded_route_hints: Vec<(BlindedPayInfo, BlindedPath)>) -> Self {
                Self {
                        payee: Payee::Blinded { route_hints: blinded_route_hints, features: None },
                        expiry_time: None,
@@ -2724,7 +2725,6 @@ mod tests {
                        inbound_scid_alias: None,
                        channel_value_satoshis: 0,
                        user_channel_id: 0,
-                       balance_msat: 0,
                        outbound_capacity_msat,
                        next_outbound_htlc_limit_msat: outbound_capacity_msat,
                        next_outbound_htlc_minimum_msat: 0,
@@ -6793,7 +6793,6 @@ pub(crate) mod bench_utils {
                        outbound_scid_alias: None,
                        channel_value_satoshis: 10_000_000_000,
                        user_channel_id: 0,
-                       balance_msat: 10_000_000_000,
                        outbound_capacity_msat: 10_000_000_000,
                        next_outbound_htlc_minimum_msat: 0,
                        next_outbound_htlc_limit_msat: 10_000_000_000,