]> git.bitcoin.ninja Git - rust-lightning/commitdiff
ser_macros: rename check_tlv_order
authorValentine Wallace <vwallace@protonmail.com>
Fri, 30 Dec 2022 23:50:26 +0000 (18:50 -0500)
committerValentine Wallace <vwallace@protonmail.com>
Thu, 5 Jan 2023 16:29:24 +0000 (11:29 -0500)
.. to disamgibutate from check_encoded_tlv_order

lightning/src/util/ser_macros.rs

index 2d7511531a9f600a0081f3f753df21d6024a1b46..d37a841eaff31945ecc2af27d624ca8570552006 100644 (file)
@@ -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);