From f34ea5f665b4289063150418c72a54620937c954 Mon Sep 17 00:00:00 2001 From: Andrew Fitzgerald Date: Thu, 8 Aug 2024 11:51:35 -0500 Subject: [PATCH] additional asserts on offset --- transaction-view/src/address_table_lookup_meta.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transaction-view/src/address_table_lookup_meta.rs b/transaction-view/src/address_table_lookup_meta.rs index 1552a60384e65e..98c86465b0b7cc 100644 --- a/transaction-view/src/address_table_lookup_meta.rs +++ b/transaction-view/src/address_table_lookup_meta.rs @@ -89,6 +89,7 @@ mod tests { let meta = AddressTableLookupMeta::try_new(&bytes, &mut offset).unwrap(); assert_eq!(meta.num_address_table_lookup, 0); assert_eq!(meta.offset, 1); + assert_eq!(offset, bytes.len()); } #[test] @@ -114,6 +115,7 @@ mod tests { let meta = AddressTableLookupMeta::try_new(&bytes, &mut offset).unwrap(); assert_eq!(meta.num_address_table_lookup, 1); assert_eq!(meta.offset, 1); + assert_eq!(offset, bytes.len()); } #[test] @@ -135,6 +137,7 @@ mod tests { let meta = AddressTableLookupMeta::try_new(&bytes, &mut offset).unwrap(); assert_eq!(meta.num_address_table_lookup, 2); assert_eq!(meta.offset, 1); + assert_eq!(offset, bytes.len()); } #[test]