You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we're receiving a keysend to a blinded path, then we created the payment
secret within. Using our inbound_payment_key, we can decrypt the payment secret
bytes to get the payment's min_cltv_expiry_delta and min amount, to verify the
payment is valid. However, if we're receiving an MPP keysend *not* to a blinded
path, then we did not create the payment secret and shouldn't verify it since
it's only used to correlate MPP parts.
Therefore, store whether the payment secret is recipient-generated in our pending
inbound payment data so we know whether to verify it or not.
let payment_hash = nodes[0].node.send_spontaneous_payment_with_retry(Some(keysend_preimage),RecipientOnionFields::spontaneous_empty(),PaymentId(keysend_preimage.0), route_params,Retry::Attempts(0)).unwrap();
1338
+
check_added_monitors(&nodes[0],1);
1339
+
1340
+
let expected_route:&[&[&Node]] = &[&[&nodes[1],&nodes[2]]];
panic!("short_channel_id == 0 should imply any pending_forward entries are of type Receive");
@@ -5886,9 +5895,8 @@ where
5886
5895
// that we are the ultimate recipient of the given payment hash.
5887
5896
// Further, we must not expose whether we have any other HTLCs
5888
5897
// associated with the same payment_hash pending or not.
5889
-
match claimable_htlc.onion_payload {
5890
-
OnionPayload::Invoice { .. } => {
5891
-
let payment_data = payment_data.unwrap();
5898
+
let payment_preimage = if has_recipient_created_payment_secret {
5899
+
if let Some(ref payment_data) = payment_data {
5892
5900
let (payment_preimage, min_final_cltv_expiry_delta) = match inbound_payment::verify(payment_hash, &payment_data, self.highest_seen_timestamp.load(Ordering::Acquire) as u64, &self.inbound_payment_key, &self.logger) {
0 commit comments