Skip to content

Commit

Permalink
correct test to avoid shared blob bytes (#19156)
Browse files Browse the repository at this point in the history
<!-- Merging Requirements:
- Please give your PR a title that is release-note friendly
- In order to be merged, you must add the most appropriate category
Label (Added, Changed, Fixed) to your PR
-->
<!-- Explain why this is an improvement (Does this add missing
functionality, improve performance, or reduce complexity?) -->

### Purpose:

<!-- Does this PR introduce a breaking change? -->

### Current Behavior:

### New Behavior:

<!-- As we aim for complete code coverage, please include details
regarding unit, and regression tests -->

### Testing Notes:

<!-- Attach any visual examples, or supporting evidence (attach any
.gif/video/console output below) -->
  • Loading branch information
altendky authored Jan 21, 2025
2 parents e7a7a67 + b168a94 commit 26ae863
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chia/_tests/core/data_layer/test_merkle_blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def test_insert_delete_loads_all_keys() -> None:

assert merkle_blob.get_keys_values() == keys_values

merkle_blob_2 = MerkleBlob(blob=merkle_blob.blob)
merkle_blob_2 = MerkleBlob(blob=bytearray(merkle_blob.blob))
for seed in range(num_keys, num_keys + extra_keys):
key, value = generate_kvid(seed)
hash = generate_hash(seed)
Expand All @@ -290,7 +290,7 @@ def test_insert_delete_loads_all_keys() -> None:
lineage = merkle_blob_2.get_lineage_with_indexes(TreeIndex(key_index))
assert len(lineage) <= max_height
keys_values[key] = value
assert merkle_blob.get_keys_values() == keys_values
assert merkle_blob_2.get_keys_values() == keys_values


def test_small_insert_deletes() -> None:
Expand Down

0 comments on commit 26ae863

Please sign in to comment.