Skip to content

Commit

Permalink
add a warn log to track deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Dec 2, 2024
1 parent 538e7d1 commit feb3294
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rollup/internal/orm/pending_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/scroll-tech/go-ethereum/common"
gethTypes "github.com/scroll-tech/go-ethereum/core/types"
"github.com/scroll-tech/go-ethereum/log"
"gorm.io/gorm"

"scroll-tech/common/types"
Expand Down Expand Up @@ -166,6 +167,9 @@ func (o *PendingTransaction) DeleteTransactionByTxHash(ctx context.Context, hash
if result.RowsAffected == 0 {
return fmt.Errorf("no pending transaction found with hash: %s", hash.String())
}
if result.RowsAffected > 0 {
log.Warn("Successfully deleted pending transaction", "hash", hash.String())
}
return nil
}

Expand Down

0 comments on commit feb3294

Please sign in to comment.