From 2c824ffa564ca7f2b3707b279dd3add5cc34c475 Mon Sep 17 00:00:00 2001 From: G8XSU <3442979+G8XSU@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:29:45 -0700 Subject: [PATCH] Retry more aggressively in VssStore. Since a failed persistence might cause LDK to panic. --- src/io/vss_store.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/io/vss_store.rs b/src/io/vss_store.rs index 474f7dbc7..470f3462c 100644 --- a/src/io/vss_store.rs +++ b/src/io/vss_store.rs @@ -46,10 +46,10 @@ impl VssStore { pub(crate) fn new(base_url: String, store_id: String, data_encryption_key: [u8; 32]) -> Self { let runtime = tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap(); let storable_builder = StorableBuilder::new(data_encryption_key, RandEntropySource); - let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(100)) - .with_max_attempts(3) - .with_max_total_delay(Duration::from_secs(2)) - .with_max_jitter(Duration::from_millis(50)) + let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(10)) + .with_max_attempts(10) + .with_max_total_delay(Duration::from_secs(15)) + .with_max_jitter(Duration::from_millis(10)) .skip_retry_on_error(Box::new(|e: &VssError| { matches!( e,