@@ -78,8 +78,8 @@ type CacheManager interface {
7878
7979// PendingManager provides operations for managing pending headers and data
8080type PendingManager interface {
81- GetPendingHeaders (ctx context.Context ) ([]* types.SignedHeader , error )
82- GetPendingData (ctx context.Context ) ([]* types.SignedData , error )
81+ GetPendingHeaders (ctx context.Context ) ([]* types.SignedHeader , [][] byte , error )
82+ GetPendingData (ctx context.Context ) ([]* types.SignedData , [][] byte , error )
8383 SetLastSubmittedHeaderHeight (ctx context.Context , height uint64 )
8484 SetLastSubmittedDataHeight (ctx context.Context , height uint64 )
8585 NumPendingHeaders () uint64
@@ -318,20 +318,21 @@ func (m *implementation) DeleteHeight(blockHeight uint64) {
318318}
319319
320320// Pending operations
321- func (m * implementation ) GetPendingHeaders (ctx context.Context ) ([]* types.SignedHeader , error ) {
321+ func (m * implementation ) GetPendingHeaders (ctx context.Context ) ([]* types.SignedHeader , [][] byte , error ) {
322322 return m .pendingHeaders .GetPendingHeaders (ctx )
323323}
324324
325- func (m * implementation ) GetPendingData (ctx context.Context ) ([]* types.SignedData , error ) {
326- // Get pending raw data
327- dataList , err := m .pendingData .GetPendingData (ctx )
325+ func (m * implementation ) GetPendingData (ctx context.Context ) ([]* types.SignedData , [][] byte , error ) {
326+ // Get pending raw data with marshalled bytes
327+ dataList , marshalledData , err := m .pendingData .GetPendingData (ctx )
328328 if err != nil {
329- return nil , err
329+ return nil , nil , err
330330 }
331331
332332 // Convert to SignedData (this logic was in manager.go)
333333 signedDataList := make ([]* types.SignedData , 0 , len (dataList ))
334- for _ , data := range dataList {
334+ marshalledSignedData := make ([][]byte , 0 , len (dataList ))
335+ for i , data := range dataList {
335336 if len (data .Txs ) == 0 {
336337 continue // Skip empty data
337338 }
@@ -342,9 +343,10 @@ func (m *implementation) GetPendingData(ctx context.Context) ([]*types.SignedDat
342343 Data : * data ,
343344 // Signature and Signer will be set by executing component
344345 })
346+ marshalledSignedData = append (marshalledSignedData , marshalledData [i ])
345347 }
346348
347- return signedDataList , nil
349+ return signedDataList , marshalledSignedData , nil
348350}
349351
350352func (m * implementation ) SetLastSubmittedHeaderHeight (ctx context.Context , height uint64 ) {
0 commit comments