Skip to content

Commit 3bd9df7

Browse files
author
colinlyguo
committed
fix(rollup-relayer): rollup status overwrite
1 parent f3ddf43 commit 3bd9df7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

common/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"runtime/debug"
66
)
77

8-
var tag = "v4.4.98"
8+
var tag = "v4.4.99"
99

1010
var commit = func() string {
1111
if info, ok := debug.ReadBuildInfo(); ok {

rollup/internal/orm/batch.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,16 @@ func (o *Batch) UpdateCommitTxHashAndRollupStatus(ctx context.Context, hash stri
413413
db = dbTX[0]
414414
}
415415
db = db.WithContext(ctx)
416+
417+
var currentBatch Batch
418+
if err := db.Where("hash", hash).First(&currentBatch).Error; err != nil {
419+
return fmt.Errorf("Batch.UpdateCommitTxHashAndRollupStatus error when querying current status: %w, batch hash: %v", err, hash)
420+
}
421+
422+
if types.RollupStatus(currentBatch.RollupStatus) == types.RollupFinalized {
423+
return nil
424+
}
425+
416426
db = db.Model(&Batch{})
417427
db = db.Where("hash", hash)
418428

0 commit comments

Comments
 (0)