Skip to content

Commit 9fbbcdc

Browse files
committed
fixup! Attributable failures pre-factor
1 parent 0462dbe commit 9fbbcdc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6070,7 +6070,7 @@ impl<SP: Deref> FundedChannel<SP> where
60706070
require_commitment = true;
60716071
match fail_msg {
60726072
HTLCFailureMsg::Relay(msg) => {
6073-
htlc.state = InboundHTLCState::LocalRemoved(InboundHTLCRemovalReason::FailRelay((&msg).into()));
6073+
htlc.state = InboundHTLCState::LocalRemoved(InboundHTLCRemovalReason::FailRelay(msg.clone().into()));
60746074
update_fail_htlcs.push(msg)
60756075
},
60766076
HTLCFailureMsg::Malformed(msg) => {

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ where
44404440
HTLCFailureMsg::Relay(msgs::UpdateFailHTLC {
44414441
channel_id: msg.channel_id,
44424442
htlc_id: msg.htlc_id,
4443-
reason: failure.data.clone(),
4443+
reason: failure.data,
44444444
})
44454445
}
44464446

@@ -5824,7 +5824,7 @@ where
58245824
let failure = match htlc_fail {
58255825
HTLCFailureMsg::Relay(fail_htlc) => HTLCForwardInfo::FailHTLC {
58265826
htlc_id: fail_htlc.htlc_id,
5827-
err_packet: (&fail_htlc).into(),
5827+
err_packet: fail_htlc.into(),
58285828
},
58295829
HTLCFailureMsg::Malformed(fail_malformed_htlc) => HTLCForwardInfo::FailMalformedHTLC {
58305830
htlc_id: fail_malformed_htlc.htlc_id,

lightning/src/ln/msgs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2355,10 +2355,10 @@ pub(crate) struct OnionErrorPacket {
23552355
pub(crate) data: Vec<u8>,
23562356
}
23572357

2358-
impl From<&UpdateFailHTLC> for OnionErrorPacket {
2359-
fn from(msg: &UpdateFailHTLC) -> Self {
2358+
impl From<UpdateFailHTLC> for OnionErrorPacket {
2359+
fn from(msg: UpdateFailHTLC) -> Self {
23602360
OnionErrorPacket {
2361-
data: msg.reason.clone(),
2361+
data: msg.reason,
23622362
}
23632363
}
23642364
}

0 commit comments

Comments
 (0)