Skip to content

Commit e2ea1ed

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.0.123-.
1 parent 7f5b830 commit e2ea1ed

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
@@ -189,23 +189,6 @@ pub use crate::ln::outbound_payment::{
189189
};
190190
use crate::ln::script::ShutdownScript;
191191

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

438-
/// Stores whether we can't forward an HTLC or relevant forwarding info
439-
#[cfg_attr(test, derive(Debug))]
440-
#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
441-
pub(super) enum PendingHTLCStatus {
442-
Forward(PendingHTLCInfo),
443-
Fail(HTLCFailureMsg),
444-
}
445-
446421
#[cfg_attr(test, derive(Clone, Debug, PartialEq))]
447422
pub(super) struct PendingAddHTLCInfo {
448423
pub(super) forward_info: PendingHTLCInfo,
@@ -16359,11 +16334,6 @@ impl Readable for HTLCFailureMsg {
1635916334
}
1636016335
}
1636116336

16362-
impl_writeable_tlv_based_enum_legacy!(PendingHTLCStatus, ;
16363-
(0, Forward),
16364-
(1, Fail),
16365-
);
16366-
1636716337
impl_writeable_tlv_based_enum!(BlindedFailure,
1636816338
(0, FromIntroductionNode) => {},
1636916339
(2, FromBlindedNode) => {},

0 commit comments

Comments
 (0)