mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-30 16:43: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>
40 lines
734 B
Go
40 lines
734 B
Go
package da
|
|
|
|
import (
|
|
"github.com/scroll-tech/go-ethereum/rollup/l1"
|
|
)
|
|
|
|
type FinalizeBatch struct {
|
|
event *l1.FinalizeBatchEvent
|
|
}
|
|
|
|
func NewFinalizeBatch(event *l1.FinalizeBatchEvent) *FinalizeBatch {
|
|
return &FinalizeBatch{
|
|
event: event,
|
|
}
|
|
}
|
|
|
|
func (f *FinalizeBatch) Type() Type {
|
|
return FinalizeBatchType
|
|
}
|
|
|
|
func (f *FinalizeBatch) L1BlockNumber() uint64 {
|
|
return f.event.BlockNumber()
|
|
}
|
|
|
|
func (f *FinalizeBatch) BatchIndex() uint64 {
|
|
return f.event.BatchIndex().Uint64()
|
|
}
|
|
|
|
func (f *FinalizeBatch) Event() l1.RollupEvent {
|
|
return f.event
|
|
}
|
|
|
|
func (f *FinalizeBatch) CompareTo(other Entry) int {
|
|
if f.BatchIndex() < other.BatchIndex() {
|
|
return -1
|
|
} else if f.BatchIndex() > other.BatchIndex() {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|