@@ -170,7 +170,6 @@ pub enum PendingHTLCRouting {
170
170
incoming_cltv_expiry: Option<u32>,
171
171
},
172
172
/// An HTLC which should be forwarded on to another Trampoline node.
173
- #[cfg(trampoline)]
174
173
TrampolineForward {
175
174
/// The onion shared secret we build with the sender (or the preceding Trampoline node) used
176
175
/// to decrypt the onion.
@@ -288,7 +287,6 @@ impl PendingHTLCRouting {
288
287
fn blinded_failure(&self) -> Option<BlindedFailure> {
289
288
match self {
290
289
Self::Forward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
291
- #[cfg(trampoline)]
292
290
Self::TrampolineForward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
293
291
Self::Receive { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
294
292
Self::ReceiveKeysend { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
@@ -299,7 +297,6 @@ impl PendingHTLCRouting {
299
297
fn incoming_cltv_expiry(&self) -> Option<u32> {
300
298
match self {
301
299
Self::Forward { incoming_cltv_expiry, .. } => *incoming_cltv_expiry,
302
- #[cfg(trampoline)]
303
300
Self::TrampolineForward { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
304
301
Self::Receive { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
305
302
Self::ReceiveKeysend { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
@@ -4510,24 +4507,7 @@ where
4510
4507
}
4511
4508
}
4512
4509
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 { .. } |
4531
4511
onion_utils::Hop::TrampolineReceive { .. } | onion_utils::Hop::TrampolineBlindedReceive { .. } => {
4532
4512
// OUR PAYMENT!
4533
4513
let current_height: u32 = self.best_block.read().unwrap().height;
@@ -4551,7 +4531,6 @@ where
4551
4531
Err(InboundHTLCErr { err_code, err_data, msg }) => return_err!(msg, err_code, &err_data)
4552
4532
}
4553
4533
},
4554
- #[cfg(trampoline)]
4555
4534
onion_utils::Hop::TrampolineForward { .. } | onion_utils::Hop::TrampolineBlindedForward { .. } => {
4556
4535
match create_fwd_pending_htlc_info(msg, decoded_hop, shared_secret, next_packet_pubkey_opt) {
4557
4536
Ok(info) => PendingHTLCStatus::Forward(info),
@@ -9067,7 +9046,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
9067
9046
for (forward_info, prev_htlc_id) in pending_forwards.drain(..) {
9068
9047
let scid = match forward_info.routing {
9069
9048
PendingHTLCRouting::Forward { short_channel_id, .. } => short_channel_id,
9070
- #[cfg(trampoline)]
9071
9049
PendingHTLCRouting::TrampolineForward { .. } => 0,
9072
9050
PendingHTLCRouting::Receive { .. } => 0,
9073
9051
PendingHTLCRouting::ReceiveKeysend { .. } => 0,
@@ -12888,36 +12866,6 @@ impl_writeable_tlv_based!(BlindedForward, {
12888
12866
(3, next_blinding_override, option),
12889
12867
});
12890
12868
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)]
12921
12869
impl_writeable_tlv_based_enum!(PendingHTLCRouting,
12922
12870
(0, Forward) => {
12923
12871
(0, onion_packet, required),
0 commit comments