Skip to content

Commit 2d392f8

Browse files
committed
ln/fix: remove undefined PERM | 1 code from reason method
This failure code isn't used anywhere in the codebase and is not defined in BOLT 04.
1 parent dd4b580 commit 2d392f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/ln/onion_utils.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1431,8 +1431,7 @@ impl HTLCFailReason {
14311431
const NODE: u16 = 0x2000;
14321432
const UPDATE: u16 = 0x1000;
14331433

1434-
if failure_code == 1 | PERM { debug_assert!(data.is_empty()) }
1435-
else if failure_code == 2 | NODE { debug_assert!(data.is_empty()) }
1434+
if failure_code == 2 | NODE { debug_assert!(data.is_empty()) }
14361435
else if failure_code == 2 | PERM | NODE { debug_assert!(data.is_empty()) }
14371436
else if failure_code == 3 | PERM | NODE { debug_assert!(data.is_empty()) }
14381437
else if failure_code == 4 | BADONION | PERM { debug_assert_eq!(data.len(), 32) }

0 commit comments

Comments
 (0)