-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add election backtest #5950
add election backtest #5950
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 nits, but this looks useful.
It would also be great to check if the miner had a block in tipsets in which it was eligible to mine, and report if it wasn't present.
cmd/lotus-shed/election.go
Outdated
if winner == nil { | ||
return nil, nil | ||
} | ||
return winner, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just be
if winner == nil { | |
return nil, nil | |
} | |
return winner, nil | |
return winner, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you.
cmd/lotus-shed/election.go
Outdated
}, | ||
&cli.IntFlag{ | ||
Name: "count", | ||
Usage: "blockchain count", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage: "blockchain count", | |
Usage: "number of won elections to look for", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now OK
Thanks for this! |
./lotus-shed election backtest t01000
height, winCount
223, 5
222, 10
221, 5
220, 7
219, 5
... ...
./lotus-shed election backtest -h
NAME:
lotus-shed election backtest - Backtest elections with given miner
USAGE:
lotus-shed election backtest [command options] [minerAddress]
OPTIONS:
--height value blockchain head height (default: 0)
--count value blockchain count (default: 120)
--help, -h show help (default: false)