@@ -4427,27 +4427,16 @@ where
4427
4427
}
4428
4428
}
4429
4429
match decoded_hop {
4430
- onion_utils::Hop::Receive(next_hop_data) => {
4431
- // OUR PAYMENT!
4432
- let current_height: u32 = self.best_block.read().unwrap().height;
4433
- match create_recv_pending_htlc_info(msgs::InboundOnionPayload::Receive(next_hop_data), shared_secret, msg.payment_hash,
4434
- msg.amount_msat, msg.cltv_expiry, None, allow_underpay, msg.skimmed_fee_msat,
4435
- current_height)
4436
- {
4437
- Ok(info) => {
4438
- // Note that we could obviously respond immediately with an update_fulfill_htlc
4439
- // message, however that would leak that we are the recipient of this payment, so
4440
- // instead we stay symmetric with the forwarding case, only responding (after a
4441
- // delay) once they've send us a commitment_signed!
4442
- PendingHTLCStatus::Forward(info)
4443
- },
4444
- Err(InboundHTLCErr { err_code, err_data, msg }) => return_err!(msg, err_code, &err_data)
4445
- }
4446
- },
4447
- onion_utils::Hop::BlindedReceive(next_hop_data) => {
4430
+ onion_utils::Hop::Receive { .. } | onion_utils::Hop::BlindedReceive { .. } => {
4431
+ let inbound_onion_payload = match decoded_hop {
4432
+ onion_utils::Hop::Receive(hop_data) => msgs::InboundOnionPayload::Receive(hop_data),
4433
+ onion_utils::Hop::BlindedReceive(hop_data) => msgs::InboundOnionPayload::BlindedReceive(hop_data),
4434
+ _ => unreachable!()
4435
+ };
4436
+
4448
4437
// OUR PAYMENT!
4449
4438
let current_height: u32 = self.best_block.read().unwrap().height;
4450
- match create_recv_pending_htlc_info(msgs::InboundOnionPayload::BlindedReceive(next_hop_data) , shared_secret, msg.payment_hash,
4439
+ match create_recv_pending_htlc_info(inbound_onion_payload , shared_secret, msg.payment_hash,
4451
4440
msg.amount_msat, msg.cltv_expiry, None, allow_underpay, msg.skimmed_fee_msat,
4452
4441
current_height)
4453
4442
{
0 commit comments