@@ -55,6 +55,11 @@ pub enum Message {
55
55
ChannelAnnouncement ( msgs:: ChannelAnnouncement ) ,
56
56
NodeAnnouncement ( msgs:: NodeAnnouncement ) ,
57
57
ChannelUpdate ( msgs:: ChannelUpdate ) ,
58
+ QueryShortChannelIds ( msgs:: QueryShortChannelIds ) ,
59
+ ReplyShortChannelIdsEnd ( msgs:: ReplyShortChannelIdsEnd ) ,
60
+ QueryChannelRange ( msgs:: QueryChannelRange ) ,
61
+ ReplyChannelRange ( msgs:: ReplyChannelRange ) ,
62
+ GossipTimestampFilter ( msgs:: GossipTimestampFilter ) ,
58
63
/// A message that could not be decoded because its type is unknown.
59
64
Unknown ( MessageType ) ,
60
65
}
@@ -90,6 +95,11 @@ impl Message {
90
95
& Message :: ChannelAnnouncement ( ref msg) => msg. type_id ( ) ,
91
96
& Message :: NodeAnnouncement ( ref msg) => msg. type_id ( ) ,
92
97
& Message :: ChannelUpdate ( ref msg) => msg. type_id ( ) ,
98
+ & Message :: QueryShortChannelIds ( ref msg) => msg. type_id ( ) ,
99
+ & Message :: ReplyShortChannelIdsEnd ( ref msg) => msg. type_id ( ) ,
100
+ & Message :: QueryChannelRange ( ref msg) => msg. type_id ( ) ,
101
+ & Message :: ReplyChannelRange ( ref msg) => msg. type_id ( ) ,
102
+ & Message :: GossipTimestampFilter ( ref msg) => msg. type_id ( ) ,
93
103
& Message :: Unknown ( type_id) => type_id,
94
104
}
95
105
}
@@ -186,6 +196,21 @@ pub fn read<R: ::std::io::Read>(buffer: &mut R) -> Result<Message, msgs::DecodeE
186
196
msgs:: ChannelUpdate :: TYPE => {
187
197
Ok ( Message :: ChannelUpdate ( Readable :: read ( buffer) ?) )
188
198
} ,
199
+ msgs:: QueryShortChannelIds :: TYPE => {
200
+ Ok ( Message :: QueryShortChannelIds ( Readable :: read ( buffer) ?) )
201
+ } ,
202
+ msgs:: ReplyShortChannelIdsEnd :: TYPE => {
203
+ Ok ( Message :: ReplyShortChannelIdsEnd ( Readable :: read ( buffer) ?) )
204
+ } ,
205
+ msgs:: QueryChannelRange :: TYPE => {
206
+ Ok ( Message :: QueryChannelRange ( Readable :: read ( buffer) ?) )
207
+ } ,
208
+ msgs:: ReplyChannelRange :: TYPE => {
209
+ Ok ( Message :: ReplyChannelRange ( Readable :: read ( buffer) ?) )
210
+ }
211
+ msgs:: GossipTimestampFilter :: TYPE => {
212
+ Ok ( Message :: GossipTimestampFilter ( Readable :: read ( buffer) ?) )
213
+ } ,
189
214
_ => {
190
215
Ok ( Message :: Unknown ( MessageType ( message_type) ) )
191
216
} ,
@@ -312,6 +337,26 @@ impl Encode for msgs::ChannelUpdate {
312
337
const TYPE : u16 = 258 ;
313
338
}
314
339
340
+ impl Encode for msgs:: QueryShortChannelIds {
341
+ const TYPE : u16 = 261 ;
342
+ }
343
+
344
+ impl Encode for msgs:: ReplyShortChannelIdsEnd {
345
+ const TYPE : u16 = 262 ;
346
+ }
347
+
348
+ impl Encode for msgs:: QueryChannelRange {
349
+ const TYPE : u16 = 263 ;
350
+ }
351
+
352
+ impl Encode for msgs:: ReplyChannelRange {
353
+ const TYPE : u16 = 264 ;
354
+ }
355
+
356
+ impl Encode for msgs:: GossipTimestampFilter {
357
+ const TYPE : u16 = 265 ;
358
+ }
359
+
315
360
#[ cfg( test) ]
316
361
mod tests {
317
362
use super :: * ;
0 commit comments