mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 00:53: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 * bump version * remove unused flag * update da-codec commit --------- Co-authored-by: Péter Garamvölgyi <peter@scroll.io>
34 lines
594 B
Go
34 lines
594 B
Go
package da
|
|
|
|
type FinalizeBatch struct {
|
|
batchIndex uint64
|
|
|
|
l1BlockNumber uint64
|
|
}
|
|
|
|
func NewFinalizeBatch(batchIndex uint64) *FinalizeBatch {
|
|
return &FinalizeBatch{
|
|
batchIndex: batchIndex,
|
|
}
|
|
}
|
|
|
|
func (f *FinalizeBatch) Type() Type {
|
|
return FinalizeBatchType
|
|
}
|
|
|
|
func (f *FinalizeBatch) L1BlockNumber() uint64 {
|
|
return f.l1BlockNumber
|
|
}
|
|
|
|
func (f *FinalizeBatch) BatchIndex() uint64 {
|
|
return f.batchIndex
|
|
}
|
|
|
|
func (f *FinalizeBatch) CompareTo(other Entry) int {
|
|
if f.BatchIndex() < other.BatchIndex() {
|
|
return -1
|
|
} else if f.BatchIndex() > other.BatchIndex() {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|