Skip to content

Commit 2170910

Browse files
Delete now-unused PendingHTLCStatus
We stopped using this struct a few commits ago when we removed support for HTLCs that were originally received on LDK 0.1.
1 parent f79003e commit 2170910

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,6 @@ use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
188188
use core::time::Duration;
189189
use core::{cmp, mem};
190190

191-
// We hold various information about HTLC relay in the HTLC objects in Channel itself:
192-
//
193-
// Upon receipt of an HTLC from a peer, we'll give it a PendingHTLCStatus indicating if it should
194-
// forward the HTLC with information it will give back to us when it does so, or if it should Fail
195-
// the HTLC with the relevant message for the Channel to handle giving to the remote peer.
196-
//
197-
// Once said HTLC is committed in the Channel, if the PendingHTLCStatus indicated Forward, the
198-
// Channel will return the PendingHTLCInfo back to us, and we will create an HTLCForwardInfo
199-
// with it to track where it came from (in case of onwards-forward error), waiting a random delay
200-
// before we forward it.
201-
//
202-
// We will then use HTLCForwardInfo's PendingHTLCInfo to construct an outbound HTLC, with a
203-
// relevant HTLCSource::PreviousHopData filled in to indicate where it came from (which we can use
204-
// to either fail-backwards or fulfill the HTLC backwards along the relevant path).
205-
// Alternatively, we can fill an outbound HTLC with a HTLCSource::OutboundRoute indicating this is
206-
// our payment, which we can use to decode errors or inform the user that the payment was sent.
207-
208191
/// Information about where a received HTLC('s onion) has indicated the HTLC should go.
209192
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
210193
#[cfg_attr(test, derive(Debug, PartialEq))]
@@ -437,14 +420,6 @@ pub(super) enum HTLCFailureMsg {
437420
Malformed(msgs::UpdateFailMalformedHTLC),
438421
}
439422

440-
/// Stores whether we can't forward an HTLC or relevant forwarding info
441-
#[cfg_attr(test, derive(Debug))]
442-
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
443-
pub(super) enum PendingHTLCStatus {
444-
Forward(PendingHTLCInfo),
445-
Fail(HTLCFailureMsg),
446-
}
447-
448423
#[cfg_attr(test, derive(Clone, Debug, PartialEq))]
449424
pub(super) struct PendingAddHTLCInfo {
450425
pub(super) forward_info: PendingHTLCInfo,
@@ -16759,11 +16734,6 @@ impl Readable for HTLCFailureMsg {
1675916734
}
1676016735
}
1676116736

16762-
impl_writeable_tlv_based_enum_legacy!(PendingHTLCStatus, ;
16763-
(0, Forward),
16764-
(1, Fail),
16765-
);
16766-
1676716737
impl_writeable_tlv_based_enum!(BlindedFailure,
1676816738
(0, FromIntroductionNode) => {},
1676916739
(2, FromBlindedNode) => {},

0 commit comments

Comments
 (0)