blockservice: avoid using unnecessary continue statement
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Kevin Atkinson committed
Jan 11, 2017 at 18:24 UTC
d086dc63ce329bdd745abaedb80a2c70b0f6f1b1
1 file changed
+2
-3
blockservice/blockservice.go
+2
-3
@@ -112,10 +112,9 @@ func (s *blockService) AddBlocks(bs []blocks.Block) ([]*cid.Cid, error) {
112
if err != nil {
113
return nil, err
114
}
115
- if has {
116
- continue
115
+ if !has {
116
+ toput = append(toput, b)
117
}
118
- toput = append(toput, b)
118
}
119
} else {
120
toput = bs