@@ -219,7 +219,7 @@ async def insert_into_data_store_from_file(
219
219
delta_reader .add_internal_nodes (internal_nodes )
220
220
delta_reader .add_leaf_nodes (terminal_nodes )
221
221
222
- missing_hashes = await anyio .to_thread .run_sync (delta_reader .get_missing_hashes )
222
+ missing_hashes = await anyio .to_thread .run_sync (delta_reader .get_missing_hashes , root_hash )
223
223
224
224
if len (missing_hashes ) > 0 :
225
225
# TODO: consider adding transactions around this code
@@ -230,7 +230,7 @@ async def insert_into_data_store_from_file(
230
230
for old_root_hash , indexes in merkle_blob_queries .items ()
231
231
]
232
232
await anyio .to_thread .run_sync (delta_reader .collect_from_merkle_blobs , jobs )
233
- await self .build_cache_and_collect_missing_hashes (root , store_id , delta_reader )
233
+ await self .build_cache_and_collect_missing_hashes (root , root_hash , store_id , delta_reader )
234
234
235
235
merkle_blob = delta_reader .create_merkle_blob_and_filter_unused_nodes (root_hash , set ())
236
236
@@ -269,10 +269,11 @@ async def build_merkle_blob_queries_for_missing_hashes(
269
269
async def build_cache_and_collect_missing_hashes (
270
270
self ,
271
271
root : Root ,
272
+ root_hash : bytes32 ,
272
273
store_id : bytes32 ,
273
274
delta_reader : DeltaReader ,
274
275
) -> None :
275
- missing_hashes = delta_reader .get_missing_hashes ()
276
+ missing_hashes = delta_reader .get_missing_hashes (root_hash )
276
277
277
278
if len (missing_hashes ) == 0 :
278
279
return
@@ -334,7 +335,7 @@ async def build_cache_and_collect_missing_hashes(
334
335
),
335
336
)
336
337
337
- missing_hashes = delta_reader .get_missing_hashes ()
338
+ missing_hashes = delta_reader .get_missing_hashes (root_hash )
338
339
339
340
log .info (f"Missing hashes: added old hashes from generation { current_generation } " )
340
341
0 commit comments