diff --git a/cmd/lotus-storage-miner/actor.go b/cmd/lotus-storage-miner/actor.go index 94ccb0846..4897c28de 100644 --- a/cmd/lotus-storage-miner/actor.go +++ b/cmd/lotus-storage-miner/actor.go @@ -53,12 +53,21 @@ var actorSetAddrsCmd = &cli.Command{ Usage: "set gas limit", Value: 0, }, + &cli.BoolFlag{ + Name: "unset", + Usage: "unset address", + Value: false, + }, }, Action: func(cctx *cli.Context) error { args := cctx.Args().Slice() - if len(args) == 0 { + unset := cctx.Bool("unset") + if len(args) == 0 && !unset { return cli.ShowSubcommandHelp(cctx) } + if len(args) > 0 && unset { + return fmt.Errorf("unset should with no arguments") + } nodeAPI, closer, err := lcli.GetStorageMinerAPI(cctx) if err != nil { @@ -76,9 +85,6 @@ var actorSetAddrsCmd = &cli.Command{ var addrs []abi.Multiaddrs for _, a := range args { - if a == "nil" { - continue - } maddr, err := ma.NewMultiaddr(a) if err != nil { return fmt.Errorf("failed to parse %q as a multiaddr: %w", a, err)