@@ -17,7 +17,7 @@ import (
1717func TestNewForcedInclusionRetriever (t * testing.T ) {
1818 client := mocks .NewMockClient (t )
1919 client .On ("GetForcedInclusionNamespace" ).Return (datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()).Maybe ()
20- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
20+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
2121
2222 gen := genesis.Genesis {
2323 DAStartHeight : 100 ,
@@ -53,7 +53,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_NotAtEpochStart(t *t
5353 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
5454 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
5555 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
56- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
56+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
5757
5858 gen := genesis.Genesis {
5959 DAStartHeight : 100 ,
@@ -84,7 +84,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_EpochStartSuccess(t
8484 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
8585 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
8686 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
87- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
87+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
8888 client .On ("Retrieve" , mock .Anything , mock .Anything , fiNs ).Return (datypes.ResultRetrieve {
8989 BaseResult : datypes.BaseResult {Code : datypes .StatusSuccess , IDs : []datypes.ID {[]byte ("id1" ), []byte ("id2" ), []byte ("id3" )}, Timestamp : time .Now ()},
9090 Data : testBlobs ,
@@ -114,7 +114,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_EpochStartNotAvailab
114114 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
115115 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
116116 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
117- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
117+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
118118
119119 // Mock the first height in epoch as not available
120120 client .On ("Retrieve" , mock .Anything , uint64 (100 ), fiNs ).Return (datypes.ResultRetrieve {
@@ -141,7 +141,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_NoBlobsAtHeight(t *t
141141 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
142142 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
143143 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
144- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
144+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
145145 client .On ("Retrieve" , mock .Anything , uint64 (100 ), fiNs ).Return (datypes.ResultRetrieve {
146146 BaseResult : datypes.BaseResult {Code : datypes .StatusNotFound },
147147 }).Once ()
@@ -172,7 +172,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_MultiHeightEpoch(t *
172172 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
173173 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
174174 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
175- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
175+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
176176 client .On ("Retrieve" , mock .Anything , uint64 (102 ), fiNs ).Return (datypes.ResultRetrieve {
177177 BaseResult : datypes.BaseResult {Code : datypes .StatusSuccess , Timestamp : time .Now ()},
178178 Data : testBlobsByHeight [102 ],
@@ -213,7 +213,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_ErrorHandling(t *tes
213213 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
214214 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
215215 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
216- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
216+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
217217 client .On ("Retrieve" , mock .Anything , uint64 (100 ), fiNs ).Return (datypes.ResultRetrieve {
218218 BaseResult : datypes.BaseResult {
219219 Code : datypes .StatusError ,
@@ -242,7 +242,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_EmptyBlobsSkipped(t
242242 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
243243 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
244244 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
245- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
245+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
246246 client .On ("Retrieve" , mock .Anything , uint64 (100 ), fiNs ).Return (datypes.ResultRetrieve {
247247 BaseResult : datypes.BaseResult {Code : datypes .StatusSuccess , Timestamp : time .Now ()},
248248 Data : [][]byte {[]byte ("tx1" ), {}, []byte ("tx2" ), nil , []byte ("tx3" )},
@@ -279,7 +279,7 @@ func TestForcedInclusionRetriever_RetrieveForcedIncludedTxs_OrderPreserved(t *te
279279 fiNs := datypes .NamespaceFromString ("test-fi-ns" ).Bytes ()
280280 client .On ("HasForcedInclusionNamespace" ).Return (true ).Maybe ()
281281 client .On ("GetForcedInclusionNamespace" ).Return (fiNs ).Maybe ()
282- client .On ("Subscribe" , mock .Anything , mock .Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
282+ client .On ("Subscribe" , mock .Anything , mock .Anything , mock . Anything ).Return ((<- chan datypes.SubscriptionEvent )(make (chan datypes.SubscriptionEvent )), nil ).Maybe ()
283283 // Return heights out of order to test ordering is preserved
284284 client .On ("Retrieve" , mock .Anything , uint64 (102 ), fiNs ).Return (datypes.ResultRetrieve {
285285 BaseResult : datypes.BaseResult {Code : datypes .StatusSuccess , Timestamp : time .Now ()},
0 commit comments