Skip to content

Commit

Permalink
add rollbackBatches interface
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Aug 26, 2024
1 parent ac1d4c8 commit 0ed1f76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ type SynchronizerReorgSupporter interface {
SetCallbackOnReorgDone(callback func(reorgData ReorgExecutionResult))
}

type rollbackBatchesData struct {
type RollbackBatchesData struct {
LastBatchNumber uint64
LastBatchAccInputHash common.Hash
}
Expand All @@ -123,7 +123,7 @@ type rollbackBatchesData struct {
type SynchronizerRollbackBatchesSupporter interface {
// SetCallbackOnRollbackBatches sets a callback that will be called when the rollbackBatches is done
// to disable it you can set nil
SetCallbackOnRollbackBatches(callback func(data rollbackBatchesData))
SetCallbackOnRollbackBatches(callback func(data RollbackBatchesData))
}

type Synchronizer interface {
Expand Down
2 changes: 2 additions & 0 deletions synchronizer/synchronizer_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func (s *SynchronizerAdapter) SetCallbackOnReorgDone(callback func(reorgData Reo
ReasonError: nreorgData.ReasonError,
})
})
}

func (s *SynchronizerAdapter) SetCallbackOnRollbackBatches(callback func(data RollbackBatchesData)) {
}

func (s *SynchronizerAdapter) Sync(returnOnSync bool) error {
Expand Down

0 comments on commit 0ed1f76

Please sign in to comment.