]> Untitled Git - bdk/commitdiff
test: fix off-by-one in `checkpoint_insert_existing`
authorvalued mammal <valuedmammal@protonmail.com>
Thu, 12 Sep 2024 19:20:16 +0000 (15:20 -0400)
committervalued mammal <valuedmammal@protonmail.com>
Thu, 12 Sep 2024 19:20:16 +0000 (15:20 -0400)
crates/core/tests/test_checkpoint.rs

index 66f945fe2759b92636b8a0dbec9172dafdf0e806..705f1c4746f84c1144cd290faeb7ce9443f29280 100644 (file)
@@ -19,7 +19,7 @@ fn checkpoint_insert_existing() {
         let cp_chain = CheckPoint::from_block_ids(blocks[..=i].iter().copied())
             .expect("must construct valid chain");
 
-        for j in 0..i {
+        for j in 0..=i {
             let block_to_insert = cp_chain
                 .get(j as u32)
                 .expect("cp of height must exist")