Skip to content

Commit d95f69d

Browse files
committed
Implement OffersMessageFlow functions
1 parent 9f87a27 commit d95f69d

File tree

3 files changed

+797
-12
lines changed

3 files changed

+797
-12
lines changed

lightning/src/ln/channelmanager.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10346,7 +10346,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
1034610346
/// Sending multiple requests increases the chances of successful delivery in case some
1034710347
/// paths are unavailable. However, only one invoice for a given [`PaymentId`] will be paid,
1034810348
/// even if multiple invoices are received.
10349-
const OFFERS_MESSAGE_REQUEST_LIMIT: usize = 10;
10349+
pub const OFFERS_MESSAGE_REQUEST_LIMIT: usize = 10;
1035010350

1035110351
impl<M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, MR: Deref, L: Deref> ChannelManager<M, T, ES, NS, SP, F, R, MR, L>
1035210352
where

lightning/src/ln/inbound_payment.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub fn create_from_hash(
214214
}
215215

216216
#[cfg(async_payments)]
217-
pub(super) fn create_for_spontaneous_payment(
217+
pub(crate) fn create_for_spontaneous_payment(
218218
keys: &ExpandedKey, min_value_msat: Option<u64>, invoice_expiry_delta_secs: u32,
219219
current_time: u64, min_final_cltv_expiry_delta: Option<u16>,
220220
) -> Result<PaymentSecret, ()> {
@@ -236,7 +236,7 @@ pub(super) fn create_for_spontaneous_payment(
236236
Ok(construct_payment_secret(&iv_bytes, &metadata_bytes, &keys.metadata_key))
237237
}
238238

239-
pub(super) fn calculate_absolute_expiry(
239+
pub(crate) fn calculate_absolute_expiry(
240240
highest_seen_timestamp: u64, invoice_expiry_delta_secs: u32,
241241
) -> u64 {
242242
// We assume that highest_seen_timestamp is pretty close to the current time - it's updated when

0 commit comments

Comments
 (0)