@@ -643,12 +643,12 @@ impl Writeable for ChannelUpdateInfo {
643
643
}
644
644
}
645
645
646
- struct ChannelUpdateInfoDeserWrap ( ChannelUpdateInfo ) ;
646
+ struct ChannelUpdateInfoDeserWrap ( Option < ChannelUpdateInfo > ) ;
647
647
648
648
impl MaybeReadable for ChannelUpdateInfoDeserWrap {
649
649
fn read < R : io:: Read > ( reader : & mut R ) -> Result < Option < Self > , DecodeError > {
650
- if let Ok ( channel_update ) = :: util:: ser:: Readable :: read ( reader) {
651
- Ok ( Some ( Self ( channel_update ) ) )
650
+ if let Ok ( channel_update_option ) = :: util:: ser:: Readable :: read ( reader) {
651
+ Ok ( Some ( Self ( channel_update_option ) ) )
652
652
} else {
653
653
Ok ( None )
654
654
}
@@ -808,9 +808,9 @@ impl Readable for ChannelInfo {
808
808
Ok ( ChannelInfo {
809
809
features : init_tlv_based_struct_field ! ( features, required) ,
810
810
node_one : init_tlv_based_struct_field ! ( node_one, required) ,
811
- one_to_two : one_to_two_wrap. map ( |w| w. 0 ) ,
811
+ one_to_two : one_to_two_wrap. map ( |w| w. 0 ) . unwrap_or ( None ) ,
812
812
node_two : init_tlv_based_struct_field ! ( node_two, required) ,
813
- two_to_one : two_to_one_wrap. map ( |w| w. 0 ) ,
813
+ two_to_one : two_to_one_wrap. map ( |w| w. 0 ) . unwrap_or ( None ) ,
814
814
capacity_sats : init_tlv_based_struct_field ! ( capacity_sats, required) ,
815
815
announcement_message : init_tlv_based_struct_field ! ( announcement_message, required) ,
816
816
announcement_received_time : init_tlv_based_struct_field ! ( announcement_received_time, ( default_value, 0 ) ) ,
0 commit comments