mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-06 12:03:47 +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>
33 lines
575 B
Go
33 lines
575 B
Go
package da
|
|
|
|
type RevertBatch struct {
|
|
batchIndex uint64
|
|
|
|
l1BlockNumber uint64
|
|
}
|
|
|
|
func NewRevertBatch(batchIndex uint64) *RevertBatch {
|
|
return &RevertBatch{
|
|
batchIndex: batchIndex,
|
|
}
|
|
}
|
|
|
|
func (r *RevertBatch) Type() Type {
|
|
return RevertBatchType
|
|
}
|
|
|
|
func (r *RevertBatch) L1BlockNumber() uint64 {
|
|
return r.l1BlockNumber
|
|
}
|
|
func (r *RevertBatch) BatchIndex() uint64 {
|
|
return r.batchIndex
|
|
}
|
|
|
|
func (r *RevertBatch) CompareTo(other Entry) int {
|
|
if r.BatchIndex() < other.BatchIndex() {
|
|
return -1
|
|
} else if r.BatchIndex() > other.BatchIndex() {
|
|
return 1
|
|
}
|
|
return 0
|
|
}
|