Skip to content

Commit 68ed7b8

Browse files
committed
Expose Bolt11PaymentError
We previously changed the BOLT11 payment API, also introducing a new error type in `outbound_payment`. However, we didn't actualy re-export that in `ChannelManager`, so it's currently inaccessible.
1 parent b8673f3 commit 68ed7b8

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,12 @@ use crate::ln::our_peer_storage::EncryptedOurPeerStorage;
8282
#[cfg(test)]
8383
use crate::ln::outbound_payment;
8484
use crate::ln::outbound_payment::{
85-
Bolt11PaymentError, OutboundPayments, PendingOutboundPayment, RetryableInvoiceRequest,
86-
SendAlongPathArgs, StaleExpiration,
85+
OutboundPayments, PendingOutboundPayment, RetryableInvoiceRequest, SendAlongPathArgs,
86+
StaleExpiration,
8787
};
88-
use crate::ln::types::ChannelId;
89-
use crate::offers::flow::OffersMessageFlow;
9088
use crate::offers::invoice::{
91-
Bolt12Invoice, DerivedSigningPubkey, InvoiceBuilder, DEFAULT_RELATIVE_EXPIRY,
89+
Bolt12Invoice, DerivedSigningPubkey, ExplicitSigningPubkey, InvoiceBuilder,
90+
UnsignedBolt12Invoice, DEFAULT_RELATIVE_EXPIRY,
9291
};
9392
use crate::offers::invoice_error::InvoiceError;
9493
use crate::offers::invoice_request::InvoiceRequest;
@@ -174,6 +173,8 @@ use alloc::collections::{btree_map, BTreeMap};
174173

175174
use crate::io;
176175
use crate::io::Read;
176+
#[cfg(any(test, feature = "_externalize_tests"))]
177+
pub(crate) use crate::ln::outbound_payment::PaymentSendFailure;
177178
use crate::prelude::*;
178179
use crate::sync::{Arc, FairRwLock, LockHeldState, LockTestExt, Mutex, RwLock, RwLockReadGuard};
179180
use bitcoin::hex::impl_fmt_traits;
@@ -183,12 +184,13 @@ use core::ops::Deref;
183184
use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
184185
use core::time::Duration;
185186
use core::{cmp, mem};
187+
186188
// Re-export this for use in the public API.
187-
#[cfg(any(test, feature = "_externalize_tests"))]
188-
pub(crate) use crate::ln::outbound_payment::PaymentSendFailure;
189189
pub use crate::ln::outbound_payment::{
190-
Bolt12PaymentError, ProbeSendFailure, RecipientOnionFields, Retry, RetryableSendFailure,
190+
Bolt11PaymentError, Bolt12PaymentError, ProbeSendFailure, RecipientOnionFields, Retry,
191+
RetryableSendFailure,
191192
};
193+
192194
use crate::ln::script::ShutdownScript;
193195

194196
// We hold various information about HTLC relay in the HTLC objects in Channel itself:

0 commit comments

Comments
 (0)