Skip to content

Commit

Permalink
fix: remove redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Oct 2, 2024
1 parent eb72649 commit 26fc997
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ethtxmanager/sqlstorage/sqlstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,6 @@ func (s *SqlStorage) Update(ctx context.Context, mTx types.MonitoredTx) error {
return fmt.Errorf("failed to build the update statement (column names resolution failed): %w", err)
}

setClause := ""
for i, col := range columns[1:] {
if i > 0 {
setClause += ", "
}
setClause += fmt.Sprintf("%s = $%d", col, i+1)
}

// Use strings.Builder instead of fmt.Sprintf for safer query building
var builder strings.Builder
builder.WriteString("UPDATE " + monitoredTxsTable + " SET ")
Expand Down

0 comments on commit 26fc997

Please sign in to comment.