Skip to content

Commit

Permalink
Optimize gas outputs 3
Browse files Browse the repository at this point in the history
  • Loading branch information
iand committed Nov 19, 2020
1 parent 9e05e8b commit 74abe07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions storage/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,10 @@ func (d *Database) FindGasOutputsMessages(ctx context.Context, batchSize int, mi
WHERE pm.gas_outputs_completed_at IS null AND
pm.height >= ? AND pm.height <= ?
AND r.height >= ? AND r.height <= ?
AND r.height > m.height AND r.height <= m.height + 10
AND r.height > m.height AND r.height <= m.height + 20
ORDER BY pm.height DESC
LIMIT ?
`, minHeight, maxHeight, minHeight+10, maxHeight+10, batchSize); err != nil {
`, minHeight, maxHeight, minHeight+1, maxHeight+1, batchSize); err != nil {
return nil, err
}
return list, nil
Expand Down

0 comments on commit 74abe07

Please sign in to comment.