-
Notifications
You must be signed in to change notification settings - Fork 17
Alerts for Merkle Root Upload and Claims #176
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
Merged
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
122db08
claims monitoring
mrmizz 90f7be1
claims monitoring
mrmizz efa39f2
claims monitoring
mrmizz 0cd8fee
claims monitoring
mrmizz 0e84e21
claims monitoring
mrmizz dc33584
claims monitoring
mrmizz 669cd6e
merkle rooti planning
mrmizz 3f04282
total distribution accounts
mrmizz f913490
epoch-percentage
mrmizz fa51cc9
epoch-percentage
mrmizz cce97bb
test
mrmizz 89ce04c
we are the same
mrmizz 54a78b6
Merge branch 'master' into ab/alerts
mrmizz 2f63d55
code tlc
mrmizz 4c119b3
code tlc
mrmizz ad0c83d
code tlc
mrmizz 1564ccd
handle err on get slot
mrmizz 2dacf88
code tlc
mrmizz ce8e4df
Merge branch 'master' into ab/alerts
mrmizz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| use anyhow::Result; | ||
|
||
| use solana_client::nonblocking::rpc_client::RpcClient; | ||
| use solana_sdk::clock::DEFAULT_SLOTS_PER_EPOCH; | ||
|
|
||
| pub async fn get(client: &RpcClient) -> Result<f64> { | ||
| let current_slot = client.get_slot().await? as f64; | ||
| let epoch_percentage = | ||
| (current_slot % DEFAULT_SLOTS_PER_EPOCH as f64) / DEFAULT_SLOTS_PER_EPOCH as f64; | ||
| Ok(epoch_percentage) | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 believe we'd want to not emit in the event of the unwrap failing so that we're not erroneously writing 0% in the event of a 429 or timeout. Thoughts?
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 with that. Best to avoid erroneous alerts.
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.
1564ccd