mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 15:20:24 +01:00
fail channel when BADONION is not set.
This commit is contained in:
parent
0e098d4bab
commit
05b580e10b
1 changed files with 2 additions and 2 deletions
|
@ -2194,8 +2194,8 @@ impl ChannelManager {
|
||||||
//TODO: here and below MsgHandleErrInternal, #153 case
|
//TODO: here and below MsgHandleErrInternal, #153 case
|
||||||
return Err(MsgHandleErrInternal::send_err_msg_no_close("Got a message for a channel from the wrong node!", msg.channel_id));
|
return Err(MsgHandleErrInternal::send_err_msg_no_close("Got a message for a channel from the wrong node!", msg.channel_id));
|
||||||
}
|
}
|
||||||
if (msg.failure_code & 0x8000) != 0 {
|
if (msg.failure_code & 0x8000) == 0 {
|
||||||
return Err(MsgHandleErrInternal::send_err_msg_close_chan("Got update_fail_malformed_htlc with BADONION set", msg.channel_id));
|
return Err(MsgHandleErrInternal::send_err_msg_close_chan("Got update_fail_malformed_htlc with BADONION not set", msg.channel_id));
|
||||||
}
|
}
|
||||||
chan.update_fail_malformed_htlc(&msg, HTLCFailReason::Reason { failure_code: msg.failure_code, data: Vec::new() })
|
chan.update_fail_malformed_htlc(&msg, HTLCFailReason::Reason { failure_code: msg.failure_code, data: Vec::new() })
|
||||||
.map_err(|e| MsgHandleErrInternal::from_chan_maybe_close(e, msg.channel_id))?;
|
.map_err(|e| MsgHandleErrInternal::from_chan_maybe_close(e, msg.channel_id))?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue