optimize code
This commit is contained in:
parent
ef08bd48b5
commit
640d6fa474
@ -142,7 +142,7 @@ var electionBacktest = &cli.Command{
|
|||||||
},
|
},
|
||||||
&cli.IntFlag{
|
&cli.IntFlag{
|
||||||
Name: "count",
|
Name: "count",
|
||||||
Usage: "blockchain count",
|
Usage: "number of won elections to look for",
|
||||||
Value: 120,
|
Value: 120,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -222,8 +222,5 @@ func backTestWinner(ctx context.Context, miner address.Address, round abi.ChainE
|
|||||||
return nil, xerrors.Errorf("failed to check if we win next round: %w", err)
|
return nil, xerrors.Errorf("failed to check if we win next round: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if winner == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return winner, nil
|
return winner, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user