-
Notifications
You must be signed in to change notification settings - Fork 24
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
Allow overwriting chain options in Daemon Builder #370
Allow overwriting chain options in Daemon Builder #370
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
cw-orch-daemon/src/sync/builder.rs
Outdated
pub(crate) deployment_id: Option<String>, | ||
pub(crate) additional_grpc_url: Option<String>, |
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.
pub(crate) additional_grpc_url: Option<String>, | |
pub(crate) overwrite_grpc_url: Option<String>, |
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.
Should either rename this or update the URL logic to add the url to the grpc url list instead of replacing it alltogether.
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 need to be able to replace it in case the current one gives errors (even if we have fallback logic right now)
Choosing for replacing it (works in most cases)
cw-orch-daemon/src/sync/builder.rs
Outdated
@@ -97,16 +100,183 @@ impl DaemonBuilder { | |||
self | |||
} | |||
|
|||
pub fn add_grpc_url(&mut self, url: &str) -> &mut Self { | |||
self.additional_grpc_url = Some(url.to_string()); |
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.
self.additional_grpc_url = Some(url.to_string()); | |
self.overwrite_grpc_url = Some(url.to_string()); |
cw-orch-daemon/src/sync/builder.rs
Outdated
// Override gas fee | ||
override_fee(&mut chain, self.gas_denom.clone(), self.gas_fee); | ||
// Override grpc_url | ||
override_grpc_url(&mut chain, self.additional_grpc_url.clone()); |
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.
override_grpc_url(&mut chain, self.additional_grpc_url.clone()); | |
override_grpc_url(&mut chain, self.overwrite_grpc_url.clone()); |
stable clippy is failing |
This PR aims at allowing developers to overwrite chain options directly in the daemon Builder.