Skip to content

Commit bd51477

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 040993b commit bd51477

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

lightning/src/offers/invoice.rs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,12 +581,28 @@ 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.
597+
pub htlc_minimum_msat: u64,
598+
599+
/// The maximum HTLC value (in millisatoshi) that is acceptable to all channel peers on the
600+
/// blinded path.
601+
pub htlc_maximum_msat: u64,
602+
603+
/// Features set in `encrypted_data_tlv` for the `encrypted_recipient_data` TLV record in an
604+
/// onion payload.
605+
pub features: BlindedHopFeatures,
590606
}
591607

592608
impl_writeable!(BlindedPayInfo, {

0 commit comments

Comments
 (0)