Add missing locks to Get()
This commit is contained in:
parent
3464dc2fdf
commit
efe9ec4906
@ -162,6 +162,8 @@ func (bs *AutobatchBlockstore) Get(ctx context.Context, c cid.Cid) (block.Block,
|
||||
return blk, err
|
||||
}
|
||||
|
||||
bs.stateLock.Lock()
|
||||
defer bs.stateLock.Unlock()
|
||||
v, ok := bs.flushingBatch.blockMap[c]
|
||||
if ok {
|
||||
return v, nil
|
||||
|
Loading…
Reference in New Issue
Block a user