workers: Actually register in miner

This commit is contained in:
Łukasz Magiera
2020-03-19 00:23:32 +01:00
parent d8c8832a37
commit 94ebbd9d90
7 changed files with 58 additions and 6 deletions
+5 -3
View File
@@ -145,12 +145,14 @@ func (sm *StorageMinerAPI) SectorsUpdate(ctx context.Context, id abi.SectorNumbe
}
func (sm *StorageMinerAPI) WorkerConnect(ctx context.Context, url string) error {
_, err := advmgr.ConnectRemote(ctx, sm.Full, url)
w, err := advmgr.ConnectRemote(ctx, sm, url)
if err != nil {
return err
return xerrors.Errorf("connecting remote storage failed: %w", err)
}
panic("todo register ")
log.Infof("Connected to a remote worker at %s", url)
return sm.StorageMgr.AddWorker(w)
}
func (sm *StorageMinerAPI) MarketImportDealData(ctx context.Context, propCid cid.Cid, path string) error {