Skip to content

Commit 22f0635

Browse files
committed
f - Use impl_writeable_tlv_based_enum_upgradable for NetworkUpdate
1 parent 1364ae1 commit 22f0635

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,19 +96,19 @@ pub enum NetworkUpdate {
9696
}
9797
}
9898

99-
impl_writeable_tlv_based_enum!(NetworkUpdate,
99+
impl_writeable_tlv_based_enum_upgradable!(NetworkUpdate,
100100
(0, ChannelUpdateMessage) => {
101101
(0, msg, required),
102102
},
103-
(1, ChannelClosed) => {
103+
(2, ChannelClosed) => {
104104
(0, short_channel_id, required),
105105
(2, is_permanent, required),
106106
},
107-
(2, NodeFailure) => {
107+
(4, NodeFailure) => {
108108
(0, node_id, required),
109109
(2, is_permanent, required),
110110
},
111-
;);
111+
);
112112

113113
/// Receives and validates network updates from peers,
114114
/// stores authentic and relevant data as a network graph.

lightning/src/util/events.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ impl MaybeReadable for Event {
318318
let mut network_update = None;
319319
read_tlv_fields!(reader, {
320320
(0, payment_hash, required),
321-
(1, network_update, option),
321+
(1, network_update, ignorable),
322322
(2, rejected_by_dest, required),
323323
});
324324
Ok(Some(Event::PaymentFailed {

0 commit comments

Comments
 (0)