Skip to content

Commit feb3294

Browse files
author
colinlyguo
committed
add a warn log to track deletion
1 parent 538e7d1 commit feb3294

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rollup/internal/orm/pending_transaction.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"github.com/scroll-tech/go-ethereum/common"
1010
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
11+
"github.com/scroll-tech/go-ethereum/log"
1112
"gorm.io/gorm"
1213

1314
"scroll-tech/common/types"
@@ -166,6 +167,9 @@ func (o *PendingTransaction) DeleteTransactionByTxHash(ctx context.Context, hash
166167
if result.RowsAffected == 0 {
167168
return fmt.Errorf("no pending transaction found with hash: %s", hash.String())
168169
}
170+
if result.RowsAffected > 0 {
171+
log.Warn("Successfully deleted pending transaction", "hash", hash.String())
172+
}
169173
return nil
170174
}
171175

0 commit comments

Comments
 (0)