@@ -189,23 +189,6 @@ pub use crate::ln::outbound_payment::{
189189};
190190use 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))]
@@ -438,14 +421,6 @@ pub(super) enum HTLCFailureMsg {
438421 Malformed(msgs::UpdateFailMalformedHTLC),
439422}
440423
441- /// Stores whether we can't forward an HTLC or relevant forwarding info
442- #[cfg_attr(test, derive(Debug))]
443- #[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
444- pub(super) enum PendingHTLCStatus {
445- Forward(PendingHTLCInfo),
446- Fail(HTLCFailureMsg),
447- }
448-
449424#[cfg_attr(test, derive(Clone, Debug, PartialEq))]
450425pub(super) struct PendingAddHTLCInfo {
451426 pub(super) forward_info: PendingHTLCInfo,
@@ -16374,11 +16349,6 @@ impl Readable for HTLCFailureMsg {
1637416349 }
1637516350}
1637616351
16377- impl_writeable_tlv_based_enum_legacy!(PendingHTLCStatus, ;
16378- (0, Forward),
16379- (1, Fail),
16380- );
16381-
1638216352impl_writeable_tlv_based_enum!(BlindedFailure,
1638316353 (0, FromIntroductionNode) => {},
1638416354 (2, FromBlindedNode) => {},
0 commit comments