From 7a78527fdeaa948b1fa4631d2738d2538db863fa Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Tue, 6 Jul 2021 17:46:21 +0200 Subject: [PATCH] remove not used sa; cleanup --- cmd/lotus-storage-miner/init.go | 2 +- cmd/lotus-storage-miner/init_restore.go | 1 - cmd/lotus-storage-miner/run.go | 2 -- extern/sector-storage/manager.go | 2 +- itests/kit/ensemble_presets.go | 1 - node/modules/storageminer.go | 4 ++-- 6 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 381232133..1cce52a41 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -470,7 +470,7 @@ func storageMinerInit(ctx context.Context, cctx *cli.Context, api v1api.FullNode AllowPreCommit2: true, AllowCommit: true, AllowUnseal: true, - }, sa, wsts, smsts) + }, wsts, smsts) if err != nil { return err } diff --git a/cmd/lotus-storage-miner/init_restore.go b/cmd/lotus-storage-miner/init_restore.go index 77d3bfc06..cc8979f18 100644 --- a/cmd/lotus-storage-miner/init_restore.go +++ b/cmd/lotus-storage-miner/init_restore.go @@ -31,7 +31,6 @@ import ( "github.com/filecoin-project/lotus/node/repo" ) -// ctx context.Context, api lapi.FullNode, addr address.Address, peerid peer.ID func restore(ctx context.Context, cctx *cli.Context, manageConfig func(*config.StorageMiner) error, after func(api lapi.FullNode, addr address.Address, peerid peer.ID, mi miner.MinerInfo) error) error { if cctx.Args().Len() != 1 { return xerrors.Errorf("expected 1 argument") diff --git a/cmd/lotus-storage-miner/run.go b/cmd/lotus-storage-miner/run.go index 35c2ab3dc..241d1b2c2 100644 --- a/cmd/lotus-storage-miner/run.go +++ b/cmd/lotus-storage-miner/run.go @@ -175,8 +175,6 @@ var runCmd = &cli.Command{ if err := minerapi.NetConnect(ctx, remoteAddrs); err != nil { return xerrors.Errorf("connecting to full node (libp2p): %w", err) } - } else { - log.Infof("No markets subsystem enabled, so no libp2p network bootstrapping") } log.Infof("Remote version %s", v) diff --git a/extern/sector-storage/manager.go b/extern/sector-storage/manager.go index 499f0e0f7..a3af6eb7c 100644 --- a/extern/sector-storage/manager.go +++ b/extern/sector-storage/manager.go @@ -120,7 +120,7 @@ type StorageAuth http.Header type WorkerStateStore *statestore.StateStore type ManagerStateStore *statestore.StateStore -func New(ctx context.Context, lstor *stores.Local, stor *stores.Remote, ls stores.LocalStorage, si stores.SectorIndex, sc SealerConfig, sa StorageAuth, wss WorkerStateStore, mss ManagerStateStore) (*Manager, error) { +func New(ctx context.Context, lstor *stores.Local, stor *stores.Remote, ls stores.LocalStorage, si stores.SectorIndex, sc SealerConfig, wss WorkerStateStore, mss ManagerStateStore) (*Manager, error) { prover, err := ffiwrapper.New(&readonlyProvider{stor: lstor, index: si}) if err != nil { return nil, xerrors.Errorf("creating prover instance: %w", err) diff --git a/itests/kit/ensemble_presets.go b/itests/kit/ensemble_presets.go index 1f836f6d6..5e9e37da5 100644 --- a/itests/kit/ensemble_presets.go +++ b/itests/kit/ensemble_presets.go @@ -37,7 +37,6 @@ func EnsembleWithMinerAndMarketNodes(t *testing.T, opts ...interface{}) (*TestFu blockTime := 100 * time.Millisecond ens := NewEnsemble(t, eopts...).FullNode(&fullnode, nopts...).Miner(&main, &fullnode, mainNodeOpts...).Start() ens.BeginMining(blockTime) - //ens.InterconnectAll().BeginMining(blockTime) marketNodeOpts := []NodeOpt{OwnerAddr(fullnode.DefaultKey), MainMiner(&main), WithSubsystem(SStorageMarket)} marketNodeOpts = append(marketNodeOpts, nopts...) diff --git a/node/modules/storageminer.go b/node/modules/storageminer.go index ca60772eb..d9b98706e 100644 --- a/node/modules/storageminer.go +++ b/node/modules/storageminer.go @@ -690,13 +690,13 @@ func RemoteStorage(lstor *stores.Local, si stores.SectorIndex, sa sectorstorage. return stores.NewRemote(lstor, si, http.Header(sa), sc.ParallelFetchLimit, &stores.DefaultPartialFileHandler{}) } -func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, lstor *stores.Local, stor *stores.Remote, ls stores.LocalStorage, si stores.SectorIndex, sc sectorstorage.SealerConfig, sa sectorstorage.StorageAuth, ds dtypes.MetadataDS) (*sectorstorage.Manager, error) { +func SectorStorage(mctx helpers.MetricsCtx, lc fx.Lifecycle, lstor *stores.Local, stor *stores.Remote, ls stores.LocalStorage, si stores.SectorIndex, sc sectorstorage.SealerConfig, ds dtypes.MetadataDS) (*sectorstorage.Manager, error) { ctx := helpers.LifecycleCtx(mctx, lc) wsts := statestore.New(namespace.Wrap(ds, WorkerCallsPrefix)) smsts := statestore.New(namespace.Wrap(ds, ManagerWorkPrefix)) - sst, err := sectorstorage.New(ctx, lstor, stor, ls, si, sc, sa, wsts, smsts) + sst, err := sectorstorage.New(ctx, lstor, stor, ls, si, sc, wsts, smsts) if err != nil { return nil, err }