diff --git a/cmd/lotus-storage-miner/run.go b/cmd/lotus-storage-miner/run.go index e23acf7ce..d1e457970 100644 --- a/cmd/lotus-storage-miner/run.go +++ b/cmd/lotus-storage-miner/run.go @@ -105,7 +105,7 @@ var runCmd = &cli.Command{ var minerapi api.StorageMiner stop, err := node.New(ctx, node.StorageMiner(&minerapi), - node.Override(new(dtypes.ShutdownCh), shutdownChan), + node.Override(new(dtypes.ShutdownChan), shutdownChan), node.Online(), node.Repo(r), diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index a2e0fbe76..6783ef0b1 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -199,7 +199,7 @@ var DaemonCmd = &cli.Command{ node.FullAPI(&api), node.Override(new(dtypes.Bootstrapper), isBootstrapper), - node.Override(new(dtypes.ShutdownCh), shutdownChan), + node.Override(new(dtypes.ShutdownChan), shutdownChan), node.Online(), node.Repo(r), diff --git a/node/builder.go b/node/builder.go index f27bb68b9..c654ebc86 100644 --- a/node/builder.go +++ b/node/builder.go @@ -150,7 +150,7 @@ func defaults() []Option { Override(new(helpers.MetricsCtx), context.Background), Override(new(record.Validator), modules.RecordValidator), Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(false)), - Override(new(dtypes.ShutdownCh), make(chan struct{})), + Override(new(dtypes.ShutdownChan), make(chan struct{})), // Filecoin modules diff --git a/node/impl/common/common.go b/node/impl/common/common.go index 518c734c2..898ccd26c 100644 --- a/node/impl/common/common.go +++ b/node/impl/common/common.go @@ -28,7 +28,7 @@ type CommonAPI struct { APISecret *dtypes.APIAlg Host host.Host Router lp2p.BaseIpfsRouting - ShutdownCh dtypes.ShutdownCh + ShutdownCh dtypes.ShutdownChan } type jwtPayload struct { diff --git a/node/modules/dtypes/shutdown.go b/node/modules/dtypes/shutdown.go index 385b99381..6497b0938 100644 --- a/node/modules/dtypes/shutdown.go +++ b/node/modules/dtypes/shutdown.go @@ -1,3 +1,5 @@ package dtypes -type ShutdownCh chan struct{} +// ShutdownChan is a channel to which you send a value if you intend to shut +// down the daemon (or storage miner), including the node and RPC server. +type ShutdownChan chan struct{}