@@ -5,15 +5,12 @@ import (
55 "testing"
66 "time"
77
8- "github.com/ipfs/go-datastore"
9- dssync "github.com/ipfs/go-datastore/sync"
108 "github.com/rs/zerolog"
119 "github.com/stretchr/testify/mock"
1210 "gotest.tools/v3/assert"
1311
1412 datypes "github.com/evstack/ev-node/pkg/da/types"
1513 "github.com/evstack/ev-node/pkg/genesis"
16- "github.com/evstack/ev-node/pkg/store"
1714 "github.com/evstack/ev-node/test/mocks"
1815)
1916
@@ -27,10 +24,7 @@ func TestNewForcedInclusionRetriever(t *testing.T) {
2724 DAEpochForcedInclusion : 10 ,
2825 }
2926
30- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
31- st := store .New (ds )
32-
33- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
27+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
3428 assert .Assert (t , retriever != nil )
3529}
3630
@@ -43,10 +37,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_NoNamespace(t *testi
4337 DAEpochForcedInclusion : 10 ,
4438 }
4539
46- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
47- st := store .New (ds )
48-
49- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
40+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
5041 ctx := context .Background ()
5142
5243 _ , err := retriever .RetrieveForcedIncludedTxs (ctx , 100 )
@@ -65,10 +56,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_NotAtEpochStart(t *t
6556 DAEpochForcedInclusion : 10 ,
6657 }
6758
68- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
69- st := store .New (ds )
70-
71- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
59+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
7260 ctx := context .Background ()
7361
7462 // Height 105 is not an epoch start (100, 110, 120, etc. are epoch starts)
@@ -101,10 +89,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_EpochStartSuccess(t
10189 DAEpochForcedInclusion : 1 , // Single height epoch
10290 }
10391
104- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
105- st := store .New (ds )
106-
107- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
92+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
10893 ctx := context .Background ()
10994
11095 // Height 100 is an epoch start
@@ -131,10 +116,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_EpochStartNotAvailab
131116 DAEpochForcedInclusion : 10 ,
132117 }
133118
134- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
135- st := store .New (ds )
136-
137- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
119+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
138120 ctx := context .Background ()
139121
140122 // Epoch boundaries: [100, 109] - retrieval happens at epoch end (109)
@@ -157,10 +139,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_NoBlobsAtHeight(t *t
157139 DAEpochForcedInclusion : 1 , // Single height epoch
158140 }
159141
160- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
161- st := store .New (ds )
162-
163- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
142+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
164143 ctx := context .Background ()
165144
166145 event , err := retriever .RetrieveForcedIncludedTxs (ctx , 100 )
@@ -198,10 +177,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_MultiHeightEpoch(t *
198177 DAEpochForcedInclusion : 3 , // Epoch: 100-102
199178 }
200179
201- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
202- st := store .New (ds )
203-
204- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
180+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
205181 ctx := context .Background ()
206182
207183 // Epoch boundaries: [100, 102] - retrieval happens at epoch end (102)
@@ -225,10 +201,7 @@ func TestForcedInclusionRetriever_processForcedInclusionBlobs(t *testing.T) {
225201 DAEpochForcedInclusion : 10 ,
226202 }
227203
228- ds := dssync .MutexWrap (datastore .NewMapDatastore ())
229- st := store .New (ds )
230-
231- retriever := NewForcedInclusionRetriever (client , gen , st , zerolog .Nop ())
204+ retriever := NewForcedInclusionRetriever (client , zerolog .Nop (), gen .DAStartHeight , gen .DAEpochForcedInclusion )
232205
233206 tests := []struct {
234207 name string
0 commit comments