@@ -191,23 +191,6 @@ pub use crate::ln::outbound_payment::{
191191};
192192use crate::ln::script::ShutdownScript;
193193
194- // We hold various information about HTLC relay in the HTLC objects in Channel itself:
195- //
196- // Upon receipt of an HTLC from a peer, we'll give it a PendingHTLCStatus indicating if it should
197- // forward the HTLC with information it will give back to us when it does so, or if it should Fail
198- // the HTLC with the relevant message for the Channel to handle giving to the remote peer.
199- //
200- // Once said HTLC is committed in the Channel, if the PendingHTLCStatus indicated Forward, the
201- // Channel will return the PendingHTLCInfo back to us, and we will create an HTLCForwardInfo
202- // with it to track where it came from (in case of onwards-forward error), waiting a random delay
203- // before we forward it.
204- //
205- // We will then use HTLCForwardInfo's PendingHTLCInfo to construct an outbound HTLC, with a
206- // relevant HTLCSource::PreviousHopData filled in to indicate where it came from (which we can use
207- // to either fail-backwards or fulfill the HTLC backwards along the relevant path).
208- // Alternatively, we can fill an outbound HTLC with a HTLCSource::OutboundRoute indicating this is
209- // our payment, which we can use to decode errors or inform the user that the payment was sent.
210-
211194/// Information about where a received HTLC('s onion) has indicated the HTLC should go.
212195#[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
213196#[cfg_attr(test, derive(Debug, PartialEq))]
@@ -440,14 +423,6 @@ pub(super) enum HTLCFailureMsg {
440423 Malformed(msgs::UpdateFailMalformedHTLC),
441424}
442425
443- /// Stores whether we can't forward an HTLC or relevant forwarding info
444- #[cfg_attr(test, derive(Debug))]
445- #[derive(Clone)] // See FundedChannel::revoke_and_ack for why, tl;dr: Rust bug
446- pub(super) enum PendingHTLCStatus {
447- Forward(PendingHTLCInfo),
448- Fail(HTLCFailureMsg),
449- }
450-
451426#[cfg_attr(test, derive(Clone, Debug, PartialEq))]
452427pub(super) struct PendingAddHTLCInfo {
453428 pub(super) forward_info: PendingHTLCInfo,
@@ -16775,11 +16750,6 @@ impl Readable for HTLCFailureMsg {
1677516750 }
1677616751}
1677716752
16778- impl_writeable_tlv_based_enum_legacy!(PendingHTLCStatus, ;
16779- (0, Forward),
16780- (1, Fail),
16781- );
16782-
1678316753impl_writeable_tlv_based_enum!(BlindedFailure,
1678416754 (0, FromIntroductionNode) => {},
1678516755 (2, FromBlindedNode) => {},
0 commit comments