Merge pull request #11060 from filecoin-project/asr/slasher-improvements
feat: slasher: improve UX
This commit is contained in:
commit
7a93a70e6e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user