@@ -170,7 +170,6 @@ pub enum PendingHTLCRouting {
170170 incoming_cltv_expiry: Option<u32>,
171171 },
172172 /// An HTLC which should be forwarded on to another Trampoline node.
173- #[cfg(trampoline)]
174173 TrampolineForward {
175174 /// The onion shared secret we build with the sender (or the preceding Trampoline node) used
176175 /// to decrypt the onion.
@@ -288,7 +287,6 @@ impl PendingHTLCRouting {
288287 fn blinded_failure(&self) -> Option<BlindedFailure> {
289288 match self {
290289 Self::Forward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
291- #[cfg(trampoline)]
292290 Self::TrampolineForward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
293291 Self::Receive { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
294292 Self::ReceiveKeysend { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
@@ -299,7 +297,6 @@ impl PendingHTLCRouting {
299297 fn incoming_cltv_expiry(&self) -> Option<u32> {
300298 match self {
301299 Self::Forward { incoming_cltv_expiry, .. } => *incoming_cltv_expiry,
302- #[cfg(trampoline)]
303300 Self::TrampolineForward { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
304301 Self::Receive { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
305302 Self::ReceiveKeysend { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
@@ -4510,24 +4507,7 @@ where
45104507 }
45114508 }
45124509 match decoded_hop {
4513- onion_utils::Hop::Receive { .. } | onion_utils::Hop::BlindedReceive { .. } => {
4514- // OUR PAYMENT!
4515- let current_height: u32 = self.best_block.read().unwrap().height;
4516- match create_recv_pending_htlc_info(decoded_hop, shared_secret, msg.payment_hash,
4517- msg.amount_msat, msg.cltv_expiry, None, allow_underpay, msg.skimmed_fee_msat,
4518- current_height)
4519- {
4520- Ok(info) => {
4521- // Note that we could obviously respond immediately with an update_fulfill_htlc
4522- // message, however that would leak that we are the recipient of this payment, so
4523- // instead we stay symmetric with the forwarding case, only responding (after a
4524- // delay) once they've sent us a commitment_signed!
4525- PendingHTLCStatus::Forward(info)
4526- },
4527- Err(InboundHTLCErr { err_code, err_data, msg }) => return_err!(msg, err_code, &err_data)
4528- }
4529- },
4530- #[cfg(trampoline)]
4510+ onion_utils::Hop::Receive { .. } | onion_utils::Hop::BlindedReceive { .. } |
45314511 onion_utils::Hop::TrampolineReceive { .. } | onion_utils::Hop::TrampolineBlindedReceive { .. } => {
45324512 // OUR PAYMENT!
45334513 let current_height: u32 = self.best_block.read().unwrap().height;
@@ -4551,7 +4531,6 @@ where
45514531 Err(InboundHTLCErr { err_code, err_data, msg }) => return_err!(msg, err_code, &err_data)
45524532 }
45534533 },
4554- #[cfg(trampoline)]
45554534 onion_utils::Hop::TrampolineForward { .. } | onion_utils::Hop::TrampolineBlindedForward { .. } => {
45564535 match create_fwd_pending_htlc_info(msg, decoded_hop, shared_secret, next_packet_pubkey_opt) {
45574536 Ok(info) => PendingHTLCStatus::Forward(info),
@@ -9067,7 +9046,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
90679046 for (forward_info, prev_htlc_id) in pending_forwards.drain(..) {
90689047 let scid = match forward_info.routing {
90699048 PendingHTLCRouting::Forward { short_channel_id, .. } => short_channel_id,
9070- #[cfg(trampoline)]
90719049 PendingHTLCRouting::TrampolineForward { .. } => 0,
90729050 PendingHTLCRouting::Receive { .. } => 0,
90739051 PendingHTLCRouting::ReceiveKeysend { .. } => 0,
@@ -12888,36 +12866,6 @@ impl_writeable_tlv_based!(BlindedForward, {
1288812866 (3, next_blinding_override, option),
1288912867});
1289012868
12891- #[cfg(not(trampoline))]
12892- impl_writeable_tlv_based_enum!(PendingHTLCRouting,
12893- (0, Forward) => {
12894- (0, onion_packet, required),
12895- (1, blinded, option),
12896- (2, short_channel_id, required),
12897- (3, incoming_cltv_expiry, option),
12898- },
12899- (1, Receive) => {
12900- (0, payment_data, required),
12901- (1, phantom_shared_secret, option),
12902- (2, incoming_cltv_expiry, required),
12903- (3, payment_metadata, option),
12904- (5, custom_tlvs, optional_vec),
12905- (7, requires_blinded_error, (default_value, false)),
12906- (9, payment_context, option),
12907- },
12908- (2, ReceiveKeysend) => {
12909- (0, payment_preimage, required),
12910- (1, requires_blinded_error, (default_value, false)),
12911- (2, incoming_cltv_expiry, required),
12912- (3, payment_metadata, option),
12913- (4, payment_data, option), // Added in 0.0.116
12914- (5, custom_tlvs, optional_vec),
12915- (7, has_recipient_created_payment_secret, (default_value, false)),
12916- (9, payment_context, option),
12917- (11, invoice_request, option),
12918- },
12919- );
12920- #[cfg(trampoline)]
1292112869impl_writeable_tlv_based_enum!(PendingHTLCRouting,
1292212870 (0, Forward) => {
1292312871 (0, onion_packet, required),
0 commit comments