Skip to content

Commit bde8855

Browse files
committed
Make BlindedPayInfo fields public
BlindedPayInfo fields need to be public in order to construct one for fuzz tests. Typically, they would be constructed from ChannelUpdateInfo for public channels and ChannelDetails for unannounced channels. For now, make the fields public so they can be constructed manually.
1 parent 3f58597 commit bde8855

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

lightning/src/offers/invoice.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,30 @@ type BlindedPayInfoIter<'a> = core::iter::Map<
581581
/// Information needed to route a payment across a [`BlindedPath`].
582582
#[derive(Clone, Debug, PartialEq)]
583583
pub struct BlindedPayInfo {
584-
fee_base_msat: u32,
585-
fee_proportional_millionths: u32,
586-
cltv_expiry_delta: u16,
587-
htlc_minimum_msat: u64,
588-
htlc_maximum_msat: u64,
589-
features: BlindedHopFeatures,
584+
/// Base fee charged (in millisatoshi) for the entire blinded path.
585+
pub fee_base_msat: u32,
586+
587+
/// Liquidity fee charged (in millionths of a satoshi) for the entire blinded path (i.e., 10,000
588+
/// is 1%).
589+
pub fee_proportional_millionths: u32,
590+
591+
/// Number of blocks subtracted from an incoming HTLC's `cltv_expiry` for the entire blinded
592+
/// path.
593+
pub cltv_expiry_delta: u16,
594+
595+
/// The minimum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
596+
/// blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
597+
/// seen by the recipient.
598+
pub htlc_minimum_msat: u64,
599+
600+
/// The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
601+
/// blinded path from the introduction node to the recipient, accounting for any fees, i.e., as
602+
/// seen by the recipient.
603+
pub htlc_maximum_msat: u64,
604+
605+
/// Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
606+
/// onion payload.
607+
pub features: BlindedHopFeatures,
590608
}
591609

592610
impl_writeable!(BlindedPayInfo, {

0 commit comments

Comments
 (0)