blockstore: cleanup style a bit

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2016-08-02 10:59:38 +01:00
parent 4183902e46
commit 9543ed6ca1

View File

@ -102,12 +102,13 @@ func (b *arccache) PutMany(bs []blocks.Block) error {
}
}
err := b.blockstore.PutMany(bs)
if err == nil {
for _, block := range bs {
b.arc.Add(block.Key(), true)
}
if err != nil {
return err
}
return err
for _, block := range bs {
b.arc.Add(block.Key(), true)
}
return nil
}
func (b *arccache) AllKeysChan(ctx context.Context) (<-chan key.Key, error) {