mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 15:02:20 +01:00
Fix an incorrect assertion in tlv stream encoding
Types must be unique and monotonically increasing (using < instead of <=)
This commit is contained in:
parent
3a33693b1e
commit
0acd5d3e46
1 changed files with 2 additions and 1 deletions
|
@ -55,7 +55,8 @@ macro_rules! _check_encoded_tlv_order {
|
|||
($last_type: expr, $type: expr, (static_value, $value: expr)) => { };
|
||||
($last_type: expr, $type: expr, $fieldty: tt) => {
|
||||
if let Some(t) = $last_type {
|
||||
debug_assert!(t <= $type);
|
||||
#[allow(unused_comparisons)] // Note that $type may be 0 making the following comparison always false
|
||||
(debug_assert!(t < $type))
|
||||
}
|
||||
$last_type = Some($type);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue