Skip to content

Commit b527cd5

Browse files
author
colinlyguo
committed
tweak comments
1 parent 528c89d commit b527cd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rollup/internal/orm/pending_transaction.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (o *PendingTransaction) InsertPendingTransaction(ctx context.Context, conte
152152
}
153153

154154
// DeleteTransactionByTxHash permanently deletes a transaction record from the database by transaction hash.
155-
// Using hard delete instead of soft delete to prevent database bloat, as repeated SendTransaction failures
155+
// Using permanent delete (Unscoped) instead of soft delete to prevent database bloat, as repeated SendTransaction failures
156156
// could write a large number of transactions to the database.
157157
func (o *PendingTransaction) DeleteTransactionByTxHash(ctx context.Context, hash common.Hash, dbTX ...*gorm.DB) error {
158158
db := o.db
@@ -162,7 +162,7 @@ func (o *PendingTransaction) DeleteTransactionByTxHash(ctx context.Context, hash
162162
db = db.WithContext(ctx)
163163
db = db.Model(&PendingTransaction{})
164164

165-
// Perform hard delete by using Unscoped()
165+
// Perform permanent delete by using Unscoped()
166166
result := db.Where("hash = ?", hash.String()).Unscoped().Delete(&PendingTransaction{})
167167
if result.Error != nil {
168168
return fmt.Errorf("failed to delete transaction, err: %w", result.Error)

0 commit comments

Comments
 (0)