From 3f4eb07769e2605481574a8d4a9165e351b4b53b Mon Sep 17 00:00:00 2001 From: "Jamil Lambert, PhD" Date: Thu, 13 Jun 2024 17:09:27 +0100 Subject: [PATCH] Add a comment to regression test The comment at the top was generated by AI --- bitcoin/src/merkle_tree/block.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitcoin/src/merkle_tree/block.rs b/bitcoin/src/merkle_tree/block.rs index fd851a79a..2656949fa 100644 --- a/bitcoin/src/merkle_tree/block.rs +++ b/bitcoin/src/merkle_tree/block.rs @@ -801,7 +801,8 @@ mod tests { #[test] fn regression_2606() { - // Attempt + // Attempt to deserialize a partial merkle tree with a number of hashes that would + // overflow the maximum allowed size. let bytes = hex!( "000006000000000000000004ee00000004c7f1ccb1000000ffff000000010000\ 0000ffffffffff1f000000000400000000000002000000000500000000000000\ @@ -811,6 +812,8 @@ mod tests { " ); let deser = encode::deserialize::(&bytes); + + // The attempt to deserialize should result in an error. assert!(deser.is_err()); }