From 22501c3c5ec42efb74bf469a8081e89e1d006f83 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Fri, 30 Dec 2022 18:50:26 -0500 Subject: [PATCH] ser_macros: rename check_tlv_order .. to disamgibutate from check_encoded_tlv_order --- lightning/src/util/ser_macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs index 2d7511531..d37a841ea 100644 --- a/lightning/src/util/ser_macros.rs +++ b/lightning/src/util/ser_macros.rs @@ -113,7 +113,7 @@ macro_rules! encode_varint_length_prefixed_tlv { } } } -macro_rules! check_tlv_order { +macro_rules! check_decoded_tlv_order { ($last_seen_type: expr, $typ: expr, $type: expr, $field: ident, (default_value, $default: expr)) => {{ #[allow(unused_comparisons)] // Note that $type may be 0 making the second comparison always true let invalid_order = ($last_seen_type.is_none() || $last_seen_type.unwrap() < $type) && $typ.0 > $type; @@ -281,7 +281,7 @@ macro_rules! decode_tlv_stream_range { } // As we read types, make sure we hit every required type: $({ - check_tlv_order!(last_seen_type, typ, $type, $field, $fieldty); + check_decoded_tlv_order!(last_seen_type, typ, $type, $field, $fieldty); })* last_seen_type = Some(typ.0); -- 2.39.5