-
Notifications
You must be signed in to change notification settings - Fork 0
chore: misc improvements #132
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
aa22c3f
to
45c6196
Compare
45c6196
to
1407629
Compare
@@ -8,6 +8,9 @@ use serde::{Deserialize, Serialize}; | |||
use std::time::Duration; | |||
use tokio::{sync::mpsc, task::JoinHandle, time}; | |||
|
|||
/// Poll interval for the transaction poller in milliseconds. | |||
const POLL_INTERVAL_MS: u64 = 1000; |
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.
Question: Why not an env var? If we changed it once here, it seems likely we'll want/need to change it again in the future, so it would likely be useful to have this as an optional env var instead of a hardcoded value.
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 didn't change this, I just made it a constant. I don't think it's also necessarily great to have this as a config value as it can be used to abuse polling the cache by reducing the poll time.
counter!("metrics.tx_succeeded").increment(1); | ||
debug!("tx succeeded"); | ||
} else { | ||
counter!("metrics.tx_reverted").increment(1); | ||
debug!("tx reverted"); |
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.
this was upside down
No description provided.