Struct PendingHTLCInfo
pub struct PendingHTLCInfo {
pub routing: PendingHTLCRouting,
pub incoming_shared_secret: [u8; 32],
pub payment_hash: PaymentHash,
pub incoming_amt_msat: Option<u64>,
pub outgoing_amt_msat: u64,
pub outgoing_cltv_value: u32,
pub skimmed_fee_msat: Option<u64>,
}
Expand description
Information about an incoming HTLC, including the PendingHTLCRouting
describing where it
should go next.
Fields§
§routing: PendingHTLCRouting
Further routing details based on whether the HTLC is being forwarded or received.
The onion shared secret we build with the sender used to decrypt the onion.
This is later used to encrypt failure packets in the event that the HTLC is failed.
payment_hash: PaymentHash
Hash of the payment preimage, to lock the payment until the receiver releases the preimage.
incoming_amt_msat: Option<u64>
Amount received in the incoming HTLC.
This field was added in LDK 0.0.113 and will be None
for objects written by prior
versions.
outgoing_amt_msat: u64
The amount the sender indicated should be forwarded on to the next hop or amount the sender intended for us to receive for received payments.
If the received amount is less than this for received payments, an intermediary hop has attempted to steal some of our funds and we should fail the HTLC (the sender should retry it along another path).
Because nodes can take less than their required fees, and because senders may wish to
improve their own privacy, this amount may be less than Self::incoming_amt_msat
for
received payments. In such cases, recipients must handle this HTLC as if it had received
Self::outgoing_amt_msat
.
outgoing_cltv_value: u32
The CLTV the sender has indicated we should set on the forwarded HTLC (or has indicated should have been set on the received HTLC for received payments).
skimmed_fee_msat: Option<u64>
The fee taken for this HTLC in addition to the standard protocol HTLC fees.
If this is a payment for forwarding, this is the fee we are taking before forwarding the HTLC.
If this is a received payment, this is the fee that our counterparty took.
This is used to allow LSPs to take fees as a part of payments, without the sender having to shoulder them.
Trait Implementations§
§impl Clone for PendingHTLCInfo
impl Clone for PendingHTLCInfo
§fn clone(&self) -> PendingHTLCInfo
fn clone(&self) -> PendingHTLCInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Readable for PendingHTLCInfo
impl Readable for PendingHTLCInfo
§fn read<R>(reader: &mut R) -> Result<PendingHTLCInfo, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<PendingHTLCInfo, DecodeError>where
R: Read,
Self
in from the given Read
.§impl Writeable for PendingHTLCInfo
impl Writeable for PendingHTLCInfo
Auto Trait Implementations§
impl Freeze for PendingHTLCInfo
impl RefUnwindSafe for PendingHTLCInfo
impl Send for PendingHTLCInfo
impl Sync for PendingHTLCInfo
impl Unpin for PendingHTLCInfo
impl UnwindSafe for PendingHTLCInfo
Blanket Implementations§
§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,
§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
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