Skip to content

Commit a5bec46

Browse files
committed
Remove legacy HTLCFailureMsg serialization code
Only reading is needed for upgrades.
1 parent eaeed77 commit a5bec46

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12832,24 +12832,7 @@ impl_writeable_tlv_based!(PendingHTLCInfo, {
1283212832

1283312833
impl Writeable for HTLCFailureMsg {
1283412834
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), io::Error> {
12835-
match self {
12836-
HTLCFailureMsg::Relay(msgs::UpdateFailHTLC { channel_id, htlc_id, reason }) => {
12837-
0u8.write(writer)?;
12838-
channel_id.write(writer)?;
12839-
htlc_id.write(writer)?;
12840-
reason.write(writer)?;
12841-
},
12842-
HTLCFailureMsg::Malformed(msgs::UpdateFailMalformedHTLC {
12843-
channel_id, htlc_id, sha256_of_onion, failure_code
12844-
}) => {
12845-
1u8.write(writer)?;
12846-
channel_id.write(writer)?;
12847-
htlc_id.write(writer)?;
12848-
sha256_of_onion.write(writer)?;
12849-
failure_code.write(writer)?;
12850-
},
12851-
}
12852-
Ok(())
12835+
unimplemented!();
1285312836
}
1285412837
}
1285512838

@@ -15054,8 +15037,8 @@ mod tests {
1505415037
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
1505515038

1505615039
create_announced_chan_between_nodes(&nodes, 0, 1);
15057-
15058-
// Since we do not send peer storage, we manually simulate receiving a dummy
15040+
15041+
// Since we do not send peer storage, we manually simulate receiving a dummy
1505915042
// `PeerStorage` from the channel partner.
1506015043
nodes[0].node.handle_peer_storage(nodes[1].node.get_our_node_id(), msgs::PeerStorage{data: vec![0; 100]});
1506115044

0 commit comments

Comments
 (0)