You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// These are errors thrown by the swap_setup/bob behaviour
413
413
Ok(Err(err)) => {
414
-
tracing::warn!(%err,"Failed to setup swap. Will retry");
415
-
Err(backoff::Error::transient(err))
414
+
Err(backoff::Error::transient(err.context("A network error occurred while setting up the swap")))
416
415
}
417
416
// This will happen if we don't establish a connection to Alice within the timeout of the MPSC channel
418
417
// The protocol does not dial Alice it self
@@ -424,6 +423,12 @@ impl EventLoopHandle {
424
423
unreachable!("We never drop the receiver of the execution setup channel, so this should never happen")
425
424
}
426
425
}
426
+
}, |err,wait_time:Duration| {
427
+
tracing::warn!(
428
+
error = ?err,
429
+
"Failed to setup swap. We will retry in {} seconds",
430
+
wait_time.as_secs_f64()
431
+
)
427
432
})
428
433
.await
429
434
.context("Failed to setup swap after retries")
@@ -448,17 +453,22 @@ impl EventLoopHandle {
448
453
449
454
let backoff = Self::create_retry_config(REQUEST_RESPONSE_PROTOCOL_TIMEOUT);
450
455
451
-
backoff::future::retry(backoff, || async{
456
+
backoff::future::retry_notify(backoff, || async{
452
457
matchself.quote_sender.send_receive(()).await{
453
458
Ok(Ok(quote)) => Ok(quote),
454
459
Ok(Err(err)) => {
455
-
tracing::warn!(%err,"Failed to request quote due to network error. Will retry");
456
-
Err(backoff::Error::transient(err))
460
+
Err(backoff::Error::transient(anyhow!(err).context("A network error occurred while requesting a quote")))
457
461
}
458
462
Err(_) => {
459
463
unreachable!("We initiate the quote channel without a timeout and store both the sender and receiver in the same struct, so this should never happen");
460
464
}
461
465
}
466
+
}, |err,wait_time:Duration| {
467
+
tracing::warn!(
468
+
error = ?err,
469
+
"Failed to request quote. We will retry in {} seconds",
470
+
wait_time.as_secs_f64()
471
+
)
462
472
})
463
473
.await
464
474
.context("Failed to request quote after retries")
@@ -469,17 +479,22 @@ impl EventLoopHandle {
469
479
470
480
let backoff = Self::create_retry_config(REQUEST_RESPONSE_PROTOCOL_TIMEOUT);
tracing::warn!(%err,"Failed to request cooperative XMR redeem due to network error. Will retry");
477
-
Err(backoff::Error::transient(err))
486
+
Err(backoff::Error::transient(anyhow!(err).context("A network error occurred while requesting cooperative XMR redeem")))
478
487
}
479
488
Err(_) => {
480
489
unreachable!("We initiate the cooperative xmr redeem channel without a timeout and store both the sender and receiver in the same struct, so this should never happen");
481
490
}
482
491
}
492
+
}, |err,wait_time:Duration| {
493
+
tracing::warn!(
494
+
error = ?err,
495
+
"Failed to request cooperative XMR redeem. We will retry in {} seconds",
496
+
wait_time.as_secs_f64()
497
+
)
483
498
})
484
499
.await
485
500
.context("Failed to request cooperative XMR redeem after retries")
tracing::warn!(%err,"Failed to send encrypted signature due to a network error. Will retry");
505
-
Err(backoff::Error::transient(err))
519
+
Err(backoff::Error::transient(anyhow!(err).context("A network error occurred while sending the encrypted signature")))
506
520
}
507
521
Err(_) => {
508
522
unreachable!("We initiate the encrypted signature channel without a timeout and store both the sender and receiver in the same struct, so this should never happen");
509
523
}
510
524
}
525
+
}, |err,wait_time:Duration| {
526
+
tracing::warn!(
527
+
error = ?err,
528
+
"Failed to send encrypted signature. We will retry in {} seconds",
529
+
wait_time.as_secs_f64()
530
+
)
511
531
})
512
532
.await
513
533
.context("Failed to send encrypted signature after retries")
0 commit comments