diff --git a/cmd/lotus/daemon.go b/cmd/lotus/daemon.go index 9fa1d42ae..9af07b896 100644 --- a/cmd/lotus/daemon.go +++ b/cmd/lotus/daemon.go @@ -401,7 +401,12 @@ var DaemonCmd = &cli.Command{ if err != nil { return fmt.Errorf("failed to start json-rpc endpoint: %s", err) } - if cctx.IsSet("slash-consensus") && cctx.IsSet("slashdb-dir") { + + if cctx.Bool("slash-consensus") { + if !cctx.IsSet("slashdb-dir") { + return fmt.Errorf("must supply path for slasher database with --slashdb-dir") + } + go func() { err := slashConsensus(api, cctx.String("slashdb-dir"), cctx.String("slasher-sender")) if err != nil { @@ -637,7 +642,6 @@ func slashConsensus(a lapi.FullNode, p string, from string) error { return xerrors.Errorf("sync incoming blocks failed: %w", err) } for block := range blocks { - log.Infof("deal with block: %d, %v, %s", block.Height, block.Miner, block.Cid()) otherBlock, extraBlock, fault, err := slashFilterMinedBlock(ctx, sf, a, block) if err != nil { log.Errorf("slash detector errored: %s", err)