Skip to content

Commit

Permalink
remove unused tree_id parameter from DataStore.batch_upsert() (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jun 18, 2024
1 parent 3061cd8 commit 74b86c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chia/data_layer/data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,6 @@ async def get_leaf_at_minimum_height(

async def batch_upsert(
self,
tree_id: bytes32,
hash: bytes32,
to_update_hashes: Set[bytes32],
pending_upsert_new_hashes: Dict[bytes32, bytes32],
Expand All @@ -1425,8 +1424,8 @@ async def batch_upsert(
node = await self.get_node(hash)
if isinstance(node, TerminalNode):
return pending_upsert_new_hashes[hash]
new_left_hash = await self.batch_upsert(tree_id, node.left_hash, to_update_hashes, pending_upsert_new_hashes)
new_right_hash = await self.batch_upsert(tree_id, node.right_hash, to_update_hashes, pending_upsert_new_hashes)
new_left_hash = await self.batch_upsert(node.left_hash, to_update_hashes, pending_upsert_new_hashes)
new_right_hash = await self.batch_upsert(node.right_hash, to_update_hashes, pending_upsert_new_hashes)
return await self._insert_internal_node(new_left_hash, new_right_hash)

async def insert_batch(
Expand Down Expand Up @@ -1555,7 +1554,6 @@ async def insert_batch(
assert latest_local_root is not None
assert latest_local_root.node_hash is not None
new_root_hash = await self.batch_upsert(
store_id,
latest_local_root.node_hash,
to_update_hashes,
pending_upsert_new_hashes,
Expand Down

0 comments on commit 74b86c0

Please sign in to comment.