@@ -77,10 +77,14 @@ type PendingManager interface {
7777 GetPendingData (ctx context.Context ) ([]* types.SignedData , [][]byte , error )
7878 SetLastSubmittedHeaderHeight (ctx context.Context , height uint64 )
7979 GetLastSubmittedHeaderHeight () uint64
80+ ResetInFlightHeaderRange (start , end uint64 )
8081 SetLastSubmittedDataHeight (ctx context.Context , height uint64 )
8182 GetLastSubmittedDataHeight () uint64
83+ ResetInFlightDataRange (start , end uint64 )
8284 NumPendingHeaders () uint64
8385 NumPendingData () uint64
86+ NumPendingHeadersTotal () uint64
87+ NumPendingDataTotal () uint64
8488}
8589
8690// Manager combines CacheManager and PendingManager.
@@ -311,6 +315,14 @@ func (m *implementation) SetLastSubmittedHeaderHeight(ctx context.Context, heigh
311315 m .pendingHeaders .SetLastSubmittedHeaderHeight (ctx , height )
312316}
313317
318+ func (m * implementation ) ResetInFlightHeaderHeight () {
319+ m .pendingHeaders .ResetInFlightHeaderRange (0 , 0 )
320+ }
321+
322+ func (m * implementation ) ResetInFlightHeaderRange (start , end uint64 ) {
323+ m .pendingHeaders .ResetInFlightHeaderRange (start , end )
324+ }
325+
314326func (m * implementation ) GetLastSubmittedDataHeight () uint64 {
315327 return m .pendingData .GetLastSubmittedDataHeight ()
316328}
@@ -319,6 +331,10 @@ func (m *implementation) SetLastSubmittedDataHeight(ctx context.Context, height
319331 m .pendingData .SetLastSubmittedDataHeight (ctx , height )
320332}
321333
334+ func (m * implementation ) ResetInFlightDataRange (start , end uint64 ) {
335+ m .pendingData .ResetInFlightDataRange (start , end )
336+ }
337+
322338func (m * implementation ) NumPendingHeaders () uint64 {
323339 return m .pendingHeaders .NumPendingHeaders ()
324340}
@@ -327,6 +343,14 @@ func (m *implementation) NumPendingData() uint64 {
327343 return m .pendingData .NumPendingData ()
328344}
329345
346+ func (m * implementation ) NumPendingHeadersTotal () uint64 {
347+ return m .pendingHeaders .NumPendingHeadersTotal ()
348+ }
349+
350+ func (m * implementation ) NumPendingDataTotal () uint64 {
351+ return m .pendingData .NumPendingDataTotal ()
352+ }
353+
330354// SetPendingEvent sets the event at the specified height.
331355func (m * implementation ) SetPendingEvent (height uint64 , event * common.DAHeightEvent ) {
332356 m .pendingMu .Lock ()
0 commit comments