Skip to content

Commit

Permalink
remove unnecessary commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-iohk committed Mar 20, 2024
1 parent 428e521 commit d61b19b
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/cassandra.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,36 +194,6 @@ func (kc *CassandraContext) updateSubmissions(submissions []Submission) error {
}, maxRetries, initialBackoff)
}

// func (kc *CassandraContext) updateSubmissionsBatch(submissions []Submission) error {
// batch := kc.Session.NewBatch(gocql.LoggedBatch) // Use gocql.UnloggedBatch for unlogged batches

// // Define your dummy values here
// dummyStateHash := "dummy_state_hash"
// dummyParent := "dummy_parent"
// dummyHeight := 123
// dummySlot := 456
// dummyValidationError := "dummy_error"
// dummyVerified := true

// kc.Log.Infof("Updating %d submissions in batch", len(submissions))
// for _, sub := range submissions {
// batch.Query(`UPDATE submissions
// SET state_hash = ?, parent = ?, height = ?, slot = ?, validation_error = ?, verified = ?
// WHERE submitted_at_date = ? AND shard = ? AND submitted_at = ? AND submitter = ?`,
// dummyStateHash, dummyParent, dummyHeight, dummySlot, dummyValidationError, dummyVerified,
// sub.SubmittedAtDate, sub.Shard, sub.SubmittedAt, sub.Submitter)
// }

// // Execute the batch
// if err := kc.Session.ExecuteBatch(batch); err != nil {
// kc.Log.Errorf("Failed to execute batch update: %v", err)
// return err
// }
// kc.Log.Infof("Submissions updated in batch")

// return nil
// }

func calculateDateRange(startTime, endTime time.Time) string {
var dateRange []string
current := startTime
Expand Down

0 comments on commit d61b19b

Please sign in to comment.