fix condition.

This commit is contained in:
Raúl Kripalani
2020-11-10 22:34:13 +00:00
parent 659ceaabdd
commit 8f5847b8e3
+1 -1
View File
@@ -90,7 +90,7 @@ func (bs *gasChargingBlocks) View(c cid.Cid, cb func([]byte) error) error {
}
// the underlying blockstore doesn't implement the viewer interface, fall back to normal Get behaviour.
blk, err := bs.Get(c)
if err != nil && blk != nil {
if err == nil && blk != nil {
return cb(blk.RawData())
}
return err