index: hold rlock in StorageList
This commit is contained in:
parent
5f1a27d52b
commit
a0af4d4d2b
@ -63,6 +63,9 @@ func NewIndex() *Index {
|
||||
}
|
||||
|
||||
func (i *Index) StorageList(ctx context.Context) (map[ID][]Decl, error) {
|
||||
i.lk.RLock()
|
||||
defer i.lk.RUnlock()
|
||||
|
||||
byID := map[ID]map[abi.SectorID]SectorFileType{}
|
||||
|
||||
for id := range i.stores {
|
||||
|
Loading…
Reference in New Issue
Block a user