Use option TLV decoding for short_channel_id
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 22 Oct 2021 05:27:58 +0000 (00:27 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Mon, 25 Oct 2021 15:18:12 +0000 (10:18 -0500)
Using ignorable TLV decoding is only applicable for an Option containing
an enum, but short_channel_id is an Option<u64>. Use option TLV encoding
instead.

lightning/src/util/events.rs

index df2532e4c4a755cfa4218b297b000aa47ef69fb9..70a6a2dd4d1be07542494d30752d06388b2c2fed 100644 (file)
@@ -468,7 +468,7 @@ impl MaybeReadable for Event {
                                                (2, rejected_by_dest, required),
                                                (3, all_paths_failed, option),
                                                (5, path, vec_type),
-                                               (7, short_channel_id, ignorable),
+                                               (7, short_channel_id, option),
                                                (9, retry, option),
                                        });
                                        Ok(Some(Event::PaymentPathFailed {