Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Dec 10, 2024
1 parent a6a1913 commit 9166646
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/chia-datalayer/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2272,6 +2272,12 @@ mod tests {

#[rstest]
fn test_free_index_reused(mut small_blob: MerkleBlob) {
// there must be enough nodes to avoid the few-node insertion methods that clear the blob
for n in 0..5 {
small_blob
.insert(KvId(n), KvId(n), &sha256_num(n), InsertLocation::Auto {})
.unwrap();
}
let (key, index) = {
let (key, index) = small_blob.key_to_index.iter().next().unwrap();
(*key, *index)
Expand Down

0 comments on commit 9166646

Please sign in to comment.