Skip to content

Commit

Permalink
Addressed comment
Browse files Browse the repository at this point in the history
  • Loading branch information
begmaroman committed Jul 15, 2024
1 parent a44c5e1 commit 2ab4710
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,14 @@ func (db *pgDB) DetectOffchainDataGaps(ctx context.Context) (map[uint64]uint64,

defer rows.Close()

type row struct {
CurrentBatchNum uint64 `db:"current_batch_num"`
NextBatchNum uint64 `db:"next_batch_num"`
}

gaps := make(map[uint64]uint64)
for rows.Next() {
data := struct {
CurrentBatchNum uint64 `db:"current_batch_num"`
NextBatchNum uint64 `db:"next_batch_num"`
}{}
var data row
if err = rows.StructScan(&data); err != nil {
return nil, err
}
Expand Down

0 comments on commit 2ab4710

Please sign in to comment.