We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e18fe26 commit 26b6e3fCopy full SHA for 26b6e3f
2 files changed
chain_sync.go
@@ -207,7 +207,7 @@ func (c *Client) doChainSync(
207
208
// prime the pump
209
ch := make(chan struct{}, 64)
210
- for i := 0; i < c.options.pipeline; i++ {
+ for range c.options.pipeline {
211
select {
212
case ch <- struct{}{}:
213
default:
util.go
@@ -38,7 +38,7 @@ func (c *circular) add(data []byte) {
38
}
39
40
func (c *circular) list() (data [][]byte) {
41
- for i := 0; i < len(c.data); i++ {
+ for i := range c.data {
42
offset := (c.index + i) % len(c.data)
43
if v := c.data[offset]; len(v) > 0 {
44
data = append(data, v)
0 commit comments