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
Require length limited reader for LN gossip messages
Continuing the work of the last few commits, here we require that some LN
gossip messages be read from a length limiting reader.
The messages' updates are separated into their own commit because they
definitely should use a length limited reader but they also require breaking
out of the ser macros. We can't use the macros because each message contains a
non-TLV field that will always consume the rest of the reader, while the ser
macros only support reading non-TLV fields that know when to stop reading.
// 1. Check we can read a valid NodeAnnouncementInfo and fail on an invalid one
4302
4302
let announcement_message = <Vec<u8>>::from_hex("d977cb9b53d93a6ff64bb5f1e158b4094b66e798fb12911168a3ccdf80a83096340a6a95da0ae8d9f776528eecdbb747eb6b545495a4319ed5378e35b21e073a000122013413a7031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f2020201010101010101010101010101010101010101010101010101010101010101010000701fffefdfc2607").unwrap();
0 commit comments