Skip to content

Commit

Permalink
add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
JayT106 committed Jun 24, 2024
1 parent d93c2ca commit 2fbaf41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/lib/eth_signer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ thiserror.workspace = true
async-trait.workspace = true
google-cloud-kms = { git="https://github.com/yoshidan/google-cloud-rust.git", rev="eb15032", features=["eth"]}
google-cloud-auth = { git="https://github.com/yoshidan/google-cloud-rust.git", rev="eb15032"}
google-cloud-gax = { git="https://github.com/yoshidan/google-cloud-rust.git", rev="eb15032"}
hex = "0.4.3"
tracing = "0.1"
ethers-signers = { version = "2.0"}
Expand Down
3 changes: 2 additions & 1 deletion core/lib/eth_signer/src/g_kms_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use std::result::Result;

use ethers_signers::Signer as EthSigner;
use google_cloud_auth::credentials::CredentialsFile;
use google_cloud_gax::retry::RetrySetting;
use google_cloud_kms::{
client::{google_cloud_auth, Client, ClientConfig},
signer::ethereum::Signer,
Expand Down Expand Up @@ -49,7 +50,7 @@ impl GKMSSigner {
.await
.map_err(|e| SignerError::SigningFailed(e.to_string()))?;

let signer = Signer::new(client, &key_name, _chain_id, None)
let signer = Signer::new(client, &key_name, _chain_id, Some(RetrySetting::default()))
.await
.map_err(|e| SignerError::SigningFailed(e.to_string()))?;

Expand Down

0 comments on commit 2fbaf41

Please sign in to comment.