Function peel_payment_onion
pub fn peel_payment_onion<NS, L, T>(
msg: &UpdateAddHTLC,
node_signer: NS,
logger: L,
secp_ctx: &Secp256k1<T>,
cur_height: u32,
accept_mpp_keysend: bool,
allow_skimmed_fees: bool,
) -> Result<PendingHTLCInfo, InboundHTLCErr>where
NS: Deref,
L: Deref,
T: Verification,
<NS as Deref>::Target: NodeSigner,
<L as Deref>::Target: Logger,
Expand description
Peel one layer off an incoming onion, returning a PendingHTLCInfo
that contains information
about the intended next-hop for the HTLC.
This does all the relevant context-free checks that LDK requires for payment relay or
acceptance. If the payment is to be received, and the amount matches the expected amount for
a given invoice, this indicates the msgs::UpdateAddHTLC
, once fully committed in the
channel, will generate an Event::PaymentClaimable
.