From d806fafee846910feaecb021cc72b6205ff8b2b4 Mon Sep 17 00:00:00 2001 From: quanzhan lu Date: Tue, 22 Dec 2020 17:46:58 +0800 Subject: [PATCH] update weight canSeal and canStore when attach update weight canSeal and canStore when attach storage --- extern/sector-storage/stores/index.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extern/sector-storage/stores/index.go b/extern/sector-storage/stores/index.go index eb3e7690f..9362a7504 100644 --- a/extern/sector-storage/stores/index.go +++ b/extern/sector-storage/stores/index.go @@ -155,6 +155,10 @@ func (i *Index) StorageAttach(ctx context.Context, si StorageInfo, st fsutil.FsS i.stores[si.ID].info.URLs = append(i.stores[si.ID].info.URLs, u) } + i.stores[si.ID].info.Weight = si.Weight + i.stores[si.ID].info.CanSeal = si.CanSeal + i.stores[si.ID].info.CanStore = si.CanStore + return nil } i.stores[si.ID] = &storageEntry{