@@ -259,14 +259,14 @@ func (w *Watcher) FetchContractEvent(blockHeight uint64) error {
259
259
}
260
260
261
261
for index , event := range rollupEvents {
262
- batchID := event .batchHash .String ()
262
+ batchHash := event .batchHash .String ()
263
263
status := statuses [index ]
264
264
// only update when db status is before event status
265
265
if event .status > status {
266
266
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 )
268
268
} 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 )
270
270
}
271
271
if err != nil {
272
272
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
367
367
event := struct {
368
368
BatchHash common.Hash
369
369
}{}
370
- // BatchID is in topics[1]
370
+ // BatchHash is in topics[1]
371
371
event .BatchHash = common .HexToHash (vLog .Topics [1 ].String ())
372
372
err := w .scrollchainABI .UnpackIntoInterface (& event , "CommitBatch" , vLog .Data )
373
373
if err != nil {
0 commit comments