@@ -1002,7 +1002,7 @@ impl MaybeReadable for Event {
1002
1002
( 4 , path, vec_type) ,
1003
1003
( 6 , short_channel_id, option) ,
1004
1004
} ) ;
1005
- Ok ( Some ( Event :: ProbeFailed {
1005
+ Ok ( Some ( Event :: ProbeFailed {
1006
1006
payment_id,
1007
1007
payment_hash,
1008
1008
path : path. unwrap ( ) ,
@@ -1011,6 +1011,28 @@ impl MaybeReadable for Event {
1011
1011
} ;
1012
1012
f ( )
1013
1013
} ,
1014
+ 25u8 => {
1015
+ let f = || {
1016
+ let mut prev_channel_id = [ 0 ; 32 ] ;
1017
+ let mut failed_next_destination_opt = None ;
1018
+ read_tlv_fields ! ( reader, {
1019
+ ( 0 , prev_channel_id, required) ,
1020
+ ( 2 , failed_next_destination_opt, ignorable) ,
1021
+ } ) ;
1022
+ if let Some ( failed_next_destination) = failed_next_destination_opt {
1023
+ Ok ( Some ( Event :: HTLCHandlingFailed {
1024
+ prev_channel_id,
1025
+ failed_next_destination,
1026
+ } ) )
1027
+ } else {
1028
+ // If we fail to read a `failed_next_destination` assume it's because
1029
+ // `MaybeReadable::read` returned `Ok(None)`, though it's also possible we
1030
+ // were simply missing the field.
1031
+ Ok ( None )
1032
+ }
1033
+ } ;
1034
+ f ( )
1035
+ } ,
1014
1036
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
1015
1037
// Version 0.0.100 failed to properly ignore odd types, possibly resulting in corrupt
1016
1038
// reads.
0 commit comments