Skip to content

Commit

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

type rollbackBatchesData struct {
LastBatchNumber uint64
LastBatchAccInputHash common.Hash
}

// SynchronizerRollbackSupporter is an interface that give support to the banna rollbackBatches
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))
}

type Synchronizer interface {
SynchronizerRunner
SynchornizerStatusQuerier
Expand Down

0 comments on commit ac1d4c8

Please sign in to comment.