Skip to content

Commit a7f0034

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 ebdbee0 commit a7f0034

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,7 @@ impl HTLCFailReason {
14181418
const NODE: u16 = 0x2000;
14191419
const UPDATE: u16 = 0x1000;
14201420

1421-
if failure_code == 1 | PERM { debug_assert!(data.is_empty()) }
1422-
else if failure_code == 2 | NODE { debug_assert!(data.is_empty()) }
1421+
if failure_code == 2 | NODE { debug_assert!(data.is_empty()) }
14231422
else if failure_code == 2 | PERM | NODE { debug_assert!(data.is_empty()) }
14241423
else if failure_code == 3 | PERM | NODE { debug_assert!(data.is_empty()) }
14251424
else if failure_code == 4 | BADONION | PERM { debug_assert_eq!(data.len(), 32) }

0 commit comments

Comments
 (0)