mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-08 21:13:46 +00:00
* port changes from #1013 * port changes from #1068 * go.mod tidy * fix compile error * fix goimports * fix log * address review comments * upgrade golang.org/x/net to 0.23.0 * port changes from #1018 * fix tests and linter errors * address review comments * refactor rollup sync service / verifier to use CalldataBlobSource to retrieve data from L1 * add configuration and initialize blob clients * fix unit tests * remove unused code * address review comments * address more review comments * Allow using MPT * fix issues after merge * bump version --------- Co-authored-by: Ömer Faruk Irmak <omerfirmak@gmail.com> Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
39 lines
709 B
Go
39 lines
709 B
Go
package da
|
|
|
|
import (
|
|
"github.com/scroll-tech/go-ethereum/rollup/l1"
|
|
)
|
|
|
|
type RevertBatch struct {
|
|
event *l1.RevertBatchEvent
|
|
}
|
|
|
|
func NewRevertBatch(event *l1.RevertBatchEvent) *RevertBatch {
|
|
return &RevertBatch{
|
|
event: event,
|
|
}
|
|
}
|
|
|
|
func (r *RevertBatch) Type() Type {
|
|
return RevertBatchType
|
|
}
|
|
|
|
func (r *RevertBatch) L1BlockNumber() uint64 {
|
|
return r.event.BlockNumber()
|
|
}
|
|
func (r *RevertBatch) BatchIndex() uint64 {
|
|
return r.event.BatchIndex().Uint64()
|
|
}
|
|
|
|
func (r *RevertBatch) Event() l1.RollupEvent {
|
|
return r.event
|
|
}
|
|
|
|
func (r *RevertBatch) CompareTo(other Entry) int {
|
|
if r.BatchIndex() < other.BatchIndex() {
|
|
return -1
|
|
} else if r.BatchIndex() > other.BatchIndex() {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|