You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commits prepares the persistence layer for the addition of
attribution data. Changes:
- Expand InboundHTLCRemovalReason serialization instead of using the
macro. When attribution data is added, it can't just be serialized
along with the existing fields because it would break backwards
compatibility. Instead the new field needs to go into the tlv block.
- Stop using OnionErrorPacket in the UpdateFailHTLC message. When
attribution data is added to OnionErrorPacket, it would not be
serialized for the wire properly because also here the new field needs
to go in the tlv extension of the message.
- Prepare HTLCFailReasonRepr serialization for that addition of
attribution data.
Co-authored-by: Matt Corallo <[email protected]>
// Note that this is written as a part of ChannelManager objects, and thus cannot change its
2950
-
// serialization format in a way which assumes we know the total serialized length/message end
2951
-
// position.
2952
-
impl_writeable!(OnionErrorPacket,{
2953
-
data
2954
-
});
2955
-
2956
2957
// Note that this is written as a part of ChannelManager objects, and thus cannot change its
2957
2958
// serialization format in a way which assumes we know the total serialized length/message end
2958
2959
// position.
@@ -4698,13 +4699,10 @@ mod tests {
4698
4699
4699
4700
#[test]
4700
4701
fnencoding_update_fail_htlc(){
4701
-
let reason = OnionErrorPacket{
4702
-
data:[1;32].to_vec(),
4703
-
};
4704
4702
let update_fail_htlc = msgs::UpdateFailHTLC{
4705
4703
channel_id:ChannelId::from_bytes([2;32]),
4706
4704
htlc_id:2316138423780173,
4707
-
reason
4705
+
reason:[1;32].to_vec()
4708
4706
};
4709
4707
let encoded_value = update_fail_htlc.encode();
4710
4708
let target_value = <Vec<u8>>::from_hex("020202020202020202020202020202020202020202020202020202020202020200083a840000034d00200101010101010101010101010101010101010101010101010101010101010101").unwrap();
0 commit comments