Skip to content

Commit 2c824ff

Browse files
committed
Retry more aggressively in VssStore.
Since a failed persistence might cause LDK to panic.
1 parent 26e61e8 commit 2c824ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/io/vss_store.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ impl VssStore {
4646
pub(crate) fn new(base_url: String, store_id: String, data_encryption_key: [u8; 32]) -> Self {
4747
let runtime = tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap();
4848
let storable_builder = StorableBuilder::new(data_encryption_key, RandEntropySource);
49-
let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(100))
50-
.with_max_attempts(3)
51-
.with_max_total_delay(Duration::from_secs(2))
52-
.with_max_jitter(Duration::from_millis(50))
49+
let retry_policy = ExponentialBackoffRetryPolicy::new(Duration::from_millis(10))
50+
.with_max_attempts(10)
51+
.with_max_total_delay(Duration::from_secs(15))
52+
.with_max_jitter(Duration::from_millis(10))
5353
.skip_retry_on_error(Box::new(|e: &VssError| {
5454
matches!(
5555
e,

0 commit comments

Comments
 (0)