Enum breez_sdk_core::lightning::ln::channelmanager::FailureCode
pub enum FailureCode {
TemporaryNodeFailure,
RequiredNodeFeatureMissing,
IncorrectOrUnknownPaymentDetails,
InvalidOnionPayload(Option<(u64, u16)>),
}
Expand description
This enum is used to specify which error data to send to peers when failing back an HTLC
using ChannelManager::fail_htlc_backwards_with_reason
.
For more info on failure codes, see https://github.com/lightning/bolts/blob/master/04-onion-routing.md#failure-messages.
Variants§
TemporaryNodeFailure
We had a temporary error processing the payment. Useful if no other error codes fit and you want to indicate that the payer may want to retry.
RequiredNodeFeatureMissing
We have a required feature which was not in this onion. For example, you may require some additional metadata that was not provided with this payment.
IncorrectOrUnknownPaymentDetails
You may wish to use this when a payment_preimage
is unknown, or the CLTV expiry of
the HTLC is too close to the current block height for safe handling.
Using this failure code in ChannelManager::fail_htlc_backwards_with_reason
is
equivalent to calling ChannelManager::fail_htlc_backwards
.
InvalidOnionPayload(Option<(u64, u16)>)
We failed to process the payload after the onion was decrypted. You may wish to use this when receiving custom HTLC TLVs with even type numbers that you don’t recognize.
If available, the tuple data may include the type number and byte offset in the decrypted byte stream where the failure occurred.
Trait Implementations§
§impl Clone for FailureCode
impl Clone for FailureCode
§fn clone(&self) -> FailureCode
fn clone(&self) -> FailureCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Into<u16> for FailureCode
impl Into<u16> for FailureCode
impl Copy for FailureCode
Auto Trait Implementations§
impl Freeze for FailureCode
impl RefUnwindSafe for FailureCode
impl Send for FailureCode
impl Sync for FailureCode
impl Unpin for FailureCode
impl UnwindSafe for FailureCode
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request