@@ -135,11 +135,11 @@ func TestProcessNextDAHeader_Success_SingleHeaderAndData(t *testing.T) {
135135 blockDataBytes , err := signedData .MarshalBinary ()
136136 require .NoError (t , err )
137137 // -----------------------------------------------------------
138- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
138+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
139139 IDs : []coreda.ID {[]byte ("dummy-id" )},
140140 Timestamp : time .Now (),
141141 }, nil ).Once ()
142- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
142+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
143143 []coreda.Blob {headerBytes , blockDataBytes }, nil ,
144144 ).Once ()
145145
@@ -247,11 +247,11 @@ func TestProcessNextDAHeader_MultipleHeadersAndData(t *testing.T) {
247247 // Add a few more invalid blobs at the end
248248 blobs = append (blobs , invalidBlob , []byte {})
249249
250- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
250+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
251251 IDs : []coreda.ID {[]byte ("dummy-id" )},
252252 Timestamp : time .Now (),
253253 }, nil ).Once ()
254- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
254+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
255255 blobs , nil ,
256256 ).Once ()
257257
@@ -311,11 +311,11 @@ func TestProcessNextDAHeaderAndData_NotFound(t *testing.T) {
311311 defer cancel ()
312312
313313 // Mock GetIDs to return empty IDs to simulate "not found" scenario
314- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , []byte ("placeholder" )).Return (& coreda.GetIDsResult {
315- IDs : []coreda.ID {}, // Empty IDs array
314+ // Example updates needed for one instance:
315+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
316+ IDs : []coreda.ID {},
316317 Timestamp : time .Now (),
317318 }, coreda .ErrBlobNotFound ).Once ()
318-
319319 ctx := context .Background ()
320320 err := manager .processNextDAHeaderAndData (ctx )
321321 require .NoError (t , err )
@@ -345,13 +345,13 @@ func TestProcessNextDAHeaderAndData_UnmarshalHeaderError(t *testing.T) {
345345 invalidBytes := []byte ("this is not a valid protobuf message" )
346346
347347 // Mock GetIDs to return success with dummy ID
348- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
348+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
349349 IDs : []coreda.ID {[]byte ("dummy-id" )},
350350 Timestamp : time .Now (),
351351 }, nil ).Once ()
352352
353353 // Mock Get to return invalid bytes
354- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
354+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
355355 []coreda.Blob {invalidBytes }, nil ,
356356 ).Once ()
357357
@@ -404,13 +404,13 @@ func TestProcessNextDAHeader_UnexpectedSequencer(t *testing.T) {
404404 require .NoError (t , err )
405405
406406 // Mock GetIDs to return success with dummy ID
407- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
407+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
408408 IDs : []coreda.ID {[]byte ("dummy-id" )},
409409 Timestamp : time .Now (),
410410 }, nil ).Once ()
411411
412412 // Mock Get to return header bytes
413- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
413+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
414414 []coreda.Blob {headerBytes }, nil ,
415415 ).Once ()
416416
@@ -448,7 +448,7 @@ func TestProcessNextDAHeader_FetchError_RetryFailure(t *testing.T) {
448448 fetchErr := errors .New ("persistent DA connection error" )
449449
450450 // Mock GetIDs to return error for all retries
451- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (
451+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (
452452 nil , fetchErr ,
453453 ).Times (dAFetcherRetries )
454454
@@ -538,7 +538,7 @@ func TestProcessNextDAHeader_HeaderAndDataAlreadySeen(t *testing.T) {
538538 Timestamp : time .Now (),
539539 }, nil ).Once ()
540540
541- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, mock . Anything ).Return (
541+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
542542 []coreda.Blob {headerBytes , blockDataBytes }, nil ,
543543 ).Once ()
544544
@@ -576,12 +576,12 @@ func TestRetrieveLoop_ProcessError_HeightFromFuture(t *testing.T) {
576576 futureErr := fmt .Errorf ("some error wrapping: %w" , ErrHeightFromFutureStr )
577577
578578 // Mock GetIDs to return future error for all retries
579- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight , [] byte ( "placeholder" ) ).Return (
579+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight ).Return (
580580 nil , futureErr ,
581581 ).Once ()
582582
583583 // Optional: Mock for the next height if needed
584- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 1 , [] byte ( "placeholder" ) ).Return (
584+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 1 ).Return (
585585 & coreda.GetIDsResult {IDs : []coreda.ID {}}, coreda .ErrBlobNotFound ,
586586 ).Maybe ()
587587
@@ -624,7 +624,7 @@ func TestRetrieveLoop_ProcessError_Other(t *testing.T) {
624624 otherErr := errors .New ("some other DA error" )
625625
626626 // Mock GetIDs to return error for all retries
627- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight , [] byte ( "placeholder" ) ).Return (
627+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight ).Return (
628628 nil , otherErr ,
629629 ).Times (dAFetcherRetries )
630630
@@ -708,11 +708,11 @@ func TestProcessNextDAHeader_WithNoTxs(t *testing.T) {
708708 emptyDataBytes , err := emptySignedData .MarshalBinary ()
709709 require .NoError (t , err )
710710
711- mockDAClient .On ("GetIDs" , mock .Anything , daHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
711+ mockDAClient .On ("GetIDs" , mock .Anything , daHeight ).Return (& coreda.GetIDsResult {
712712 IDs : []coreda.ID {[]byte ("dummy-id" )},
713713 Timestamp : time .Now (),
714714 }, nil ).Once ()
715- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
715+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
716716 []coreda.Blob {headerBytes , emptyDataBytes }, nil ,
717717 ).Once ()
718718
@@ -761,23 +761,23 @@ func TestRetrieveLoop_DAHeightIncrementsOnlyOnSuccess(t *testing.T) {
761761 require .NoError (t , err )
762762
763763 // 1. First call: success (header)
764- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
764+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight ).Return (& coreda.GetIDsResult {
765765 IDs : []coreda.ID {[]byte ("dummy-id" )},
766766 Timestamp : time .Now (),
767767 }, nil ).Once ()
768- mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}, [] byte ( "placeholder" ) ).Return (
768+ mockDAClient .On ("Get" , mock .Anything , []coreda.ID {[]byte ("dummy-id" )}).Return (
769769 []coreda.Blob {headerBytes }, nil ,
770770 ).Once ()
771771
772772 // 2. Second call: NotFound
773- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 1 , [] byte ( "placeholder" ) ).Return (& coreda.GetIDsResult {
773+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 1 ).Return (& coreda.GetIDsResult {
774774 IDs : nil ,
775775 Timestamp : time .Now (),
776776 }, nil ).Once ()
777777
778778 // 3. Third call: Error
779779 errDA := errors .New ("some DA error" )
780- mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 2 , [] byte ( "placeholder" ) ).Return (
780+ mockDAClient .On ("GetIDs" , mock .Anything , startDAHeight + 2 ).Return (
781781 & coreda.GetIDsResult {
782782 IDs : nil ,
783783 Timestamp : time .Now (),
0 commit comments