Skip to content

Commit f58c320

Browse files
committed
ln/fix: invalid_onion_version code for DecodeError::UnknownVersion
Realm is no longer specified in BOLT04, use the specified version error instead.
1 parent a7f0034 commit f58c320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/onion_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,7 @@ fn decode_next_hop<T, R: ReadableArgs<T>, N: NextPacketBytes>(
19881988
Err(err) => {
19891989
let error_code = match err {
19901990
// Unknown realm byte
1991-
msgs::DecodeError::UnknownVersion => 0x4000 | 1,
1991+
msgs::DecodeError::UnknownVersion => 0x8000 | 0x4000 | 1,
19921992
// invalid_onion_payload
19931993
msgs::DecodeError::UnknownRequiredFeature
19941994
| msgs::DecodeError::InvalidValue

0 commit comments

Comments
 (0)