-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(gas_price_service_v1): ensure that the algo updater is synced to l2 block height #2504
fix(gas_price_service_v1): ensure that the algo updater is synced to l2 block height #2504
Conversation
|
||
// then | ||
// no panic | ||
// sleep to allow the service to sync | ||
tokio::time::sleep(std::time::Duration::from_millis(100)).await; |
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.
personally I'm not a fan of sleep of sleeps to wait for a condition to happen, but this is orthogonal to the PR.
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.
Agree, but with tokio time I can accept it since tokio auto-advances time when all futures are pending.
(Reference https://docs.rs/tokio/latest/tokio/time/fn.pause.html)
|
||
// then | ||
// no panic | ||
// sleep to allow the service to sync | ||
tokio::time::sleep(std::time::Duration::from_millis(100)).await; |
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.
Agree, but with tokio time I can accept it since tokio auto-advances time when all futures are pending.
(Reference https://docs.rs/tokio/latest/tokio/time/fn.pause.html)
Linked Issues/PRs
Description
We didn't have this check in the
uninitialized_task__init__if_metadata_behind_l2_height_then_sync
test, which caused us to miss the duped algo updater.Checklist
Before requesting review
After merging, notify other teams
[Add or remove entries as needed]