Skip to content

Commit b76dbdd

Browse files
committed
ln/fix: return incorrect payment details for invalid keysend
Per: https://github.com/lightning/blips/blob/master/blip-0003.md
1 parent fcb2902 commit b76dbdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/onion_payment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ pub(super) fn create_recv_pending_htlc_info(
367367
let hashed_preimage = PaymentHash(Sha256::hash(&payment_preimage.0).to_byte_array());
368368
if hashed_preimage != payment_hash {
369369
return Err(InboundHTLCErr {
370-
err_code: 0x4000|22,
371-
err_data: Vec::new(),
370+
err_code: 0x4000 | 15,
371+
err_data: invalid_payment_err_data(amt_msat, current_height),
372372
msg: "Payment preimage didn't match payment hash",
373373
});
374374
}

0 commit comments

Comments
 (0)