Skip to content

Commit

Permalink
adjust retries for compression nonce
Browse files Browse the repository at this point in the history
  • Loading branch information
imabdulbasit committed Oct 18, 2023
1 parent 8d54164 commit 3834032
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion consumer/src/solana.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,21 @@ impl Solana {
&self,
signature: &Signature,
) -> Result<u32, SolanaAssetIdError> {
let response = with_retry!(
let response = (|| async {
self.rpc()
.get_transaction(signature, UiTransactionEncoding::Json)
.await
})
.retry(
&ExponentialBuilder::default()
.with_jitter()
.with_min_delay(Duration::from_millis(300))
.with_max_delay(Duration::from_secs(2))
.with_max_times(25),
)
.notify(|err: &ClientError, dur: Duration| {
error!("retrying error {:?} in {:?}", err, dur);
})
.await?;

let meta = response
Expand Down

0 comments on commit 3834032

Please sign in to comment.