@@ -35,47 +35,11 @@ import (
3535 "github.com/onflow/flow-go/utils/unittest"
3636)
3737
38- // TestLoadRegisterStore_Disabled tests that LoadRegisterStore returns nil when enableStorehouse is false
39- func TestLoadRegisterStore_Disabled (t * testing.T ) {
40- t .Parallel ()
41-
42- log := unittest .Logger ()
43- state := protocolmock .NewState (t )
44- headers := storagemock .NewHeaders (t )
45- protocolEvents := events .NewDistributor ()
46- lastFinalizedHeight := uint64 (100 )
47- collector := & metrics.NoopCollector {}
48- enableStorehouse := false
49- registerDir := t .TempDir ()
50- triedir := t .TempDir ()
51- importCheckpointWorkerCount := 1
52- var importFunc storehouse.ImportRegistersFromCheckpoint = nil
53-
54- registerStore , closer , err := storehouse .LoadRegisterStore (
55- log ,
56- state ,
57- headers ,
58- protocolEvents ,
59- lastFinalizedHeight ,
60- collector ,
61- enableStorehouse ,
62- registerDir ,
63- triedir ,
64- importCheckpointWorkerCount ,
65- importFunc ,
66- )
67-
68- require .NoError (t , err )
69- require .Nil (t , registerStore )
70- require .Nil (t , closer )
71- }
72-
7338// TestLoadBackgroundIndexerEngine_StorehouseEnabled tests that LoadBackgroundIndexerEngine returns nil when enableStorehouse is true
7439func TestLoadBackgroundIndexerEngine_StorehouseEnabled (t * testing.T ) {
7540 t .Parallel ()
7641
7742 log := unittest .Logger ()
78- enableStorehouse := true
7943 enableBackgroundStorehouseIndexing := true
8044 state := protocolmock .NewState (t )
8145 headers := storagemock .NewHeaders (t )
@@ -93,7 +57,6 @@ func TestLoadBackgroundIndexerEngine_StorehouseEnabled(t *testing.T) {
9357 heightsPerSecond := uint64 (10 )
9458 engine , created , err := storehouse .LoadBackgroundIndexerEngine (
9559 log ,
96- enableStorehouse ,
9760 enableBackgroundStorehouseIndexing ,
9861 state ,
9962 headers ,
@@ -121,7 +84,6 @@ func TestLoadBackgroundIndexerEngine_BackgroundIndexingDisabled(t *testing.T) {
12184 t .Parallel ()
12285
12386 log := unittest .Logger ()
124- enableStorehouse := false
12587 enableBackgroundStorehouseIndexing := false
12688 state := protocolmock .NewState (t )
12789 headers := storagemock .NewHeaders (t )
@@ -139,7 +101,6 @@ func TestLoadBackgroundIndexerEngine_BackgroundIndexingDisabled(t *testing.T) {
139101 heightsPerSecond := uint64 (10 )
140102 engine , created , err := storehouse .LoadBackgroundIndexerEngine (
141103 log ,
142- enableStorehouse ,
143104 enableBackgroundStorehouseIndexing ,
144105 state ,
145106 headers ,
@@ -173,7 +134,6 @@ func TestLoadBackgroundIndexerEngine_Bootstrap(t *testing.T) {
173134 )
174135
175136 log := unittest .Logger ()
176- enableStorehouse := false
177137 enableBackgroundStorehouseIndexing := true
178138
179139 // Set up protocol state with finalized blocks
@@ -255,7 +215,6 @@ func TestLoadBackgroundIndexerEngine_Bootstrap(t *testing.T) {
255215 // Create background indexer engine
256216 engine , created , err := storehouse .LoadBackgroundIndexerEngine (
257217 log ,
258- enableStorehouse ,
259218 enableBackgroundStorehouseIndexing ,
260219 state ,
261220 headers ,
@@ -321,7 +280,6 @@ func TestLoadBackgroundIndexerEngine_Bootstrap(t *testing.T) {
321280 protocolEvents ,
322281 registerStoreStart ,
323282 collector ,
324- true , // enableStorehouse
325283 registerDir ,
326284 triedir ,
327285 importCheckpointWorkerCount ,
@@ -356,7 +314,6 @@ func TestLoadBackgroundIndexerEngine_Indexing(t *testing.T) {
356314 )
357315
358316 log := unittest .Logger ()
359- enableStorehouse := false
360317 enableBackgroundStorehouseIndexing := true
361318
362319 // Set up protocol state
@@ -503,7 +460,6 @@ func TestLoadBackgroundIndexerEngine_Indexing(t *testing.T) {
503460 // Create background indexer engine
504461 engine , created , err := storehouse .LoadBackgroundIndexerEngine (
505462 log ,
506- enableStorehouse ,
507463 enableBackgroundStorehouseIndexing ,
508464 state ,
509465 headers ,
@@ -616,7 +572,6 @@ indexingComplete:
616572 protocolEvents ,
617573 targetHeight , // Use targetHeight instead of registerStoreStart so FinalizedReader knows about all blocks
618574 collector ,
619- true , // enableStorehouse
620575 registerDir ,
621576 triedir ,
622577 importCheckpointWorkerCount ,
0 commit comments