Skip to content
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(forge): set script verification retries at 5 with a 5 second delay #2739

Merged
merged 2 commits into from
Aug 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion cli/src/cmd/forge/script/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ impl VerifyBundle {
project: &Project,
config: &Config,
known_contracts: ContractsByArtifact,
retry: RetryArgs,
mut retry: RetryArgs,
) -> Self {
let num_of_optimizations =
if config.optimizer { Some(config.optimizer_runs) } else { None };
Expand All @@ -549,6 +549,12 @@ impl VerifyBundle {
config_path: if config_path.exists() { Some(config_path) } else { None },
};

// Default from `RetryArgs` struct.
if retry.delay.is_none() && retry.retries == 1 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just add these defaults directly on RetryArgs if they are more sane defaults for the create-related commands

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on that, let's just bump the Retry defaults instead

retry.delay = Some(5);
retry.retries = 5;
}

VerifyBundle {
num_of_optimizations,
known_contracts,
Expand Down