Skip to content

Commit 89d0c5e

Browse files
committed
f: cfg-gate TrampolineForward
1 parent 56d4647 commit 89d0c5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ pub enum PendingHTLCRouting {
171171
incoming_cltv_expiry: Option<u32>,
172172
},
173173
/// An HTLC which should be forwarded on to another Trampoline node.
174+
#[cfg(trampoline)]
174175
TrampolineForward {
175176
/// The onion shared secret we build with the sender (or the preceding Trampoline node) used
176177
/// to decrypt the onion.
@@ -288,6 +289,7 @@ impl PendingHTLCRouting {
288289
fn blinded_failure(&self) -> Option<BlindedFailure> {
289290
match self {
290291
Self::Forward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
292+
#[cfg(trampoline)]
291293
Self::TrampolineForward { blinded: Some(BlindedForward { failure, .. }), .. } => Some(*failure),
292294
Self::Receive { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
293295
Self::ReceiveKeysend { requires_blinded_error: true, .. } => Some(BlindedFailure::FromBlindedNode),
@@ -298,6 +300,7 @@ impl PendingHTLCRouting {
298300
fn incoming_cltv_expiry(&self) -> Option<u32> {
299301
match self {
300302
Self::Forward { incoming_cltv_expiry, .. } => *incoming_cltv_expiry,
303+
#[cfg(trampoline)]
301304
Self::TrampolineForward { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
302305
Self::Receive { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
303306
Self::ReceiveKeysend { incoming_cltv_expiry, .. } => Some(*incoming_cltv_expiry),
@@ -8929,6 +8932,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
89298932
for (forward_info, prev_htlc_id) in pending_forwards.drain(..) {
89308933
let scid = match forward_info.routing {
89318934
PendingHTLCRouting::Forward { short_channel_id, .. } => short_channel_id,
8935+
#[cfg(trampoline)]
89328936
PendingHTLCRouting::TrampolineForward { .. } => 0,
89338937
PendingHTLCRouting::Receive { .. } => 0,
89348938
PendingHTLCRouting::ReceiveKeysend { .. } => 0,

0 commit comments

Comments
 (0)