Skip to content

Commit 8c6ac25

Browse files
committed
fix typo
1 parent be44caa commit 8c6ac25

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bridge/l1/watcher.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ func (w *Watcher) FetchContractEvent(blockHeight uint64) error {
259259
}
260260

261261
for index, event := range rollupEvents {
262-
batchID := event.batchHash.String()
262+
batchHash := event.batchHash.String()
263263
status := statuses[index]
264264
// only update when db status is before event status
265265
if event.status > status {
266266
if event.status == types.RollupFinalized {
267-
err = w.db.UpdateFinalizeTxHashAndRollupStatus(w.ctx, batchID, event.txHash.String(), event.status)
267+
err = w.db.UpdateFinalizeTxHashAndRollupStatus(w.ctx, batchHash, event.txHash.String(), event.status)
268268
} else if event.status == types.RollupCommitted {
269-
err = w.db.UpdateCommitTxHashAndRollupStatus(w.ctx, batchID, event.txHash.String(), event.status)
269+
err = w.db.UpdateCommitTxHashAndRollupStatus(w.ctx, batchHash, event.txHash.String(), event.status)
270270
}
271271
if err != nil {
272272
log.Error("Failed to update Rollup/Finalize TxHash and Status", "err", err)
@@ -367,7 +367,7 @@ func (w *Watcher) parseBridgeEventLogs(logs []geth_types.Log) ([]*types.L1Messag
367367
event := struct {
368368
BatchHash common.Hash
369369
}{}
370-
// BatchID is in topics[1]
370+
// BatchHash is in topics[1]
371371
event.BatchHash = common.HexToHash(vLog.Topics[1].String())
372372
err := w.scrollchainABI.UnpackIntoInterface(&event, "CommitBatch", vLog.Data)
373373
if err != nil {

0 commit comments

Comments
 (0)