From 2ecd32987443b9b359993d7c2373364aa62dfbf5 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Tue, 26 Sep 2023 10:39:27 -0300 Subject: [PATCH] fix `roundtrip_sapling_tree_root` and `roundtrip_orchard_tree_root` proptests --- .../src/service/finalized_state/disk_format/tests/prop.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zebra-state/src/service/finalized_state/disk_format/tests/prop.rs b/zebra-state/src/service/finalized_state/disk_format/tests/prop.rs index 658b174d506..cd3c6cf26d8 100644 --- a/zebra-state/src/service/finalized_state/disk_format/tests/prop.rs +++ b/zebra-state/src/service/finalized_state/disk_format/tests/prop.rs @@ -376,7 +376,7 @@ fn roundtrip_sapling_subtree_data() { let _init_guard = zebra_test::init(); proptest!(|(mut val in any::>())| { - val.end = val.end.clamp(Height(0), MAX_ON_DISK_HEIGHT); + val.end.0 %= MAX_ON_DISK_HEIGHT.0 + 1; assert_value_properties(val) }); } @@ -462,6 +462,7 @@ fn roundtrip_orchard_subtree_data() { proptest!(|(mut val in any::>())| { val.end = val.end.clamp(Height(0), MAX_ON_DISK_HEIGHT); + val.end.0 %= MAX_ON_DISK_HEIGHT.0 + 1; assert_value_properties(val) }); }