-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add top miners endpoint #2000
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
Conversation
4f5d992
to
e74bc48
Compare
d572056
to
b436a69
Compare
@type top_miner_index() :: | ||
{Stats.interval_by(), Stats.interval_start(), pubkey()} | ||
@type top_miner() :: | ||
record(:top_miner, index: top_miner_index, count: pos_integer()) |
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.
We already have the Model.miner()
record, why not use that to store the amount of times it has been a miner?
|
||
key_boundary = | ||
{{interval_by, min_date, 0, Util.min_bin()}, | ||
{interval_by, max_date, Util.max_int(), Util.max_256bit_bin()}} |
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.
I'm not sure I'm following the use of this implementation? what's the benefit of getting the top miners per month? wouldn't you want the global top miners?
resolves: #1963