Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct test to avoid shared blob bytes #19156

Merged
merged 2 commits into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading