@@ -73,12 +73,12 @@ async def test_block_store(tmp_dir: Path, db_version: int, bt: BlockTools, use_c
7373 async with DBConnection (db_version ) as db_wrapper , DBConnection (db_version ) as db_wrapper_2 :
7474 # Use a different file for the blockchain
7575 coin_store_2 = await CoinStore .create (db_wrapper_2 )
76- store_2 = await BlockStore .create (db_wrapper_2 , bt . constants , use_cache = use_cache )
76+ store_2 = await BlockStore .create (db_wrapper_2 , use_cache = use_cache )
7777 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper_2 )
7878 bc = await Blockchain .create (coin_store_2 , store_2 , height_map , bt .constants , 2 )
7979
80- store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
81- await BlockStore .create (db_wrapper_2 , bt . constants )
80+ store = await BlockStore .create (db_wrapper , use_cache = use_cache )
81+ await BlockStore .create (db_wrapper_2 )
8282
8383 # Save/get block
8484 for block in blocks :
@@ -149,7 +149,7 @@ async def test_get_full_blocks_at(
149149 async with DBConnection (2 ) as db_wrapper :
150150 # Use a different file for the blockchain
151151 coin_store = await CoinStore .create (db_wrapper )
152- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
152+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
153153 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
154154 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
155155
@@ -177,7 +177,7 @@ async def test_get_block_records_in_range(
177177 async with DBConnection (2 ) as db_wrapper :
178178 # Use a different file for the blockchain
179179 coin_store = await CoinStore .create (db_wrapper )
180- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
180+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
181181 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
182182 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
183183
@@ -207,7 +207,7 @@ async def test_get_block_bytes_in_range_in_main_chain(
207207 async with DBConnection (2 ) as db_wrapper :
208208 # Use a different file for the blockchain
209209 coin_store = await CoinStore .create (db_wrapper )
210- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
210+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
211211 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
212212 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
213213 count = 0
@@ -234,9 +234,9 @@ async def test_deadlock(tmp_dir: Path, db_version: int, bt: BlockTools, use_cach
234234 blocks = bt .get_consecutive_blocks (10 )
235235
236236 async with PathDBConnection (db_version ) as wrapper , PathDBConnection (db_version ) as wrapper_2 :
237- store = await BlockStore .create (wrapper , bt . constants , use_cache = use_cache )
237+ store = await BlockStore .create (wrapper , use_cache = use_cache )
238238 coin_store_2 = await CoinStore .create (wrapper_2 )
239- store_2 = await BlockStore .create (wrapper_2 , bt . constants )
239+ store_2 = await BlockStore .create (wrapper_2 )
240240 height_map = await BlockHeightMap .create (tmp_dir , wrapper_2 )
241241 bc = await Blockchain .create (coin_store_2 , store_2 , height_map , bt .constants , 2 )
242242 block_records = []
@@ -267,7 +267,7 @@ async def test_rollback(bt: BlockTools, tmp_dir: Path, use_cache: bool, default_
267267 async with DBConnection (2 ) as db_wrapper :
268268 # Use a different file for the blockchain
269269 coin_store = await CoinStore .create (db_wrapper )
270- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
270+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
271271 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
272272 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
273273
@@ -330,7 +330,7 @@ async def test_count_compactified_blocks(bt: BlockTools, tmp_dir: Path, db_versi
330330
331331 async with DBConnection (db_version ) as db_wrapper :
332332 coin_store = await CoinStore .create (db_wrapper )
333- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
333+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
334334 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
335335 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
336336
@@ -351,7 +351,7 @@ async def test_count_uncompactified_blocks(bt: BlockTools, tmp_dir: Path, db_ver
351351
352352 async with DBConnection (db_version ) as db_wrapper :
353353 coin_store = await CoinStore .create (db_wrapper )
354- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
354+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
355355 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
356356 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
357357
@@ -379,7 +379,7 @@ def rand_vdf_proof() -> VDFProof:
379379
380380 async with DBConnection (db_version ) as db_wrapper :
381381 coin_store = await CoinStore .create (db_wrapper )
382- block_store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
382+ block_store = await BlockStore .create (db_wrapper , use_cache = use_cache )
383383 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper )
384384 bc = await Blockchain .create (coin_store , block_store , height_map , bt .constants , 2 )
385385 for block in blocks :
@@ -416,7 +416,7 @@ def generator(i: int) -> SerializedProgram:
416416 return SerializedProgram .from_bytes (int_to_bytes (i + 1 ))
417417
418418 async with DBConnection (db_version ) as db_wrapper :
419- store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
419+ store = await BlockStore .create (db_wrapper , use_cache = use_cache )
420420
421421 new_blocks = []
422422 for i , original_block in enumerate (blocks ):
@@ -460,12 +460,12 @@ async def test_get_blocks_by_hash(tmp_dir: Path, bt: BlockTools, db_version: int
460460 async with DBConnection (db_version ) as db_wrapper , DBConnection (db_version ) as db_wrapper_2 :
461461 # Use a different file for the blockchain
462462 coin_store_2 = await CoinStore .create (db_wrapper_2 )
463- store_2 = await BlockStore .create (db_wrapper_2 , bt . constants , use_cache = use_cache )
463+ store_2 = await BlockStore .create (db_wrapper_2 , use_cache = use_cache )
464464 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper_2 )
465465 bc = await Blockchain .create (coin_store_2 , store_2 , height_map , bt .constants , 2 )
466466
467- store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
468- await BlockStore .create (db_wrapper_2 , bt . constants )
467+ store = await BlockStore .create (db_wrapper , use_cache = use_cache )
468+ await BlockStore .create (db_wrapper_2 )
469469
470470 print ("starting test" )
471471 hashes = []
@@ -500,11 +500,11 @@ async def test_get_block_bytes_in_range(tmp_dir: Path, bt: BlockTools, db_versio
500500 async with DBConnection (db_version ) as db_wrapper_2 :
501501 # Use a different file for the blockchain
502502 coin_store_2 = await CoinStore .create (db_wrapper_2 )
503- store_2 = await BlockStore .create (db_wrapper_2 , bt . constants , use_cache = use_cache )
503+ store_2 = await BlockStore .create (db_wrapper_2 , use_cache = use_cache )
504504 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper_2 )
505505 bc = await Blockchain .create (coin_store_2 , store_2 , height_map , bt .constants , 2 )
506506
507- await BlockStore .create (db_wrapper_2 , bt . constants )
507+ await BlockStore .create (db_wrapper_2 )
508508
509509 # Save/get block
510510 for block in blocks :
@@ -525,13 +525,13 @@ async def test_get_block_bytes_in_range(tmp_dir: Path, bt: BlockTools, db_versio
525525async def test_unsupported_version (tmp_dir : Path , use_cache : bool ) -> None :
526526 with pytest .raises (RuntimeError , match = "BlockStore does not support database schema v1" ):
527527 async with DBConnection (1 ) as db_wrapper :
528- await BlockStore .create (db_wrapper , DEFAULT_CONSTANTS , use_cache = use_cache )
528+ await BlockStore .create (db_wrapper , use_cache = use_cache )
529529
530530
531531@pytest .mark .anyio
532532async def test_get_peak (tmp_dir : Path , db_version : int , use_cache : bool ) -> None :
533533 async with DBConnection (db_version ) as db_wrapper :
534- store = await BlockStore .create (db_wrapper , DEFAULT_CONSTANTS , use_cache = use_cache )
534+ store = await BlockStore .create (db_wrapper , use_cache = use_cache )
535535
536536 assert await store .get_peak () is None
537537
@@ -573,12 +573,12 @@ async def test_get_prev_hash(tmp_dir: Path, bt: BlockTools, db_version: int, use
573573 async with DBConnection (db_version ) as db_wrapper , DBConnection (db_version ) as db_wrapper_2 :
574574 # Use a different file for the blockchain
575575 coin_store_2 = await CoinStore .create (db_wrapper_2 )
576- store_2 = await BlockStore .create (db_wrapper_2 , bt . constants , use_cache = use_cache )
576+ store_2 = await BlockStore .create (db_wrapper_2 , use_cache = use_cache )
577577 height_map = await BlockHeightMap .create (tmp_dir , db_wrapper_2 )
578578 bc = await Blockchain .create (coin_store_2 , store_2 , height_map , bt .constants , 2 )
579579
580- store = await BlockStore .create (db_wrapper , bt . constants , use_cache = use_cache )
581- await BlockStore .create (db_wrapper_2 , bt . constants )
580+ store = await BlockStore .create (db_wrapper , use_cache = use_cache )
581+ await BlockStore .create (db_wrapper_2 )
582582
583583 # Save/get block
584584 for block in blocks :
0 commit comments