Skip to content

Commit 46dd04b

Browse files
committed
refactor: Round down logged retry duration to whole seconds
1 parent 308bc3c commit 46dd04b

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

swap/src/asb/event_loop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ impl EventLoopHandle {
746746
swap_id = %self.swap_id,
747747
error = ?e,
748748
"Failed to send transfer proof. We will retry in {} seconds",
749-
wait_time.as_secs_f64()
749+
wait_time.as_secs()
750750
)
751751
},
752752
)

swap/src/cli/event_loop.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl EventLoopHandle {
427427
tracing::warn!(
428428
error = ?err,
429429
"Failed to setup swap. We will retry in {} seconds",
430-
wait_time.as_secs_f64()
430+
wait_time.as_secs()
431431
)
432432
})
433433
.await
@@ -467,7 +467,7 @@ impl EventLoopHandle {
467467
tracing::warn!(
468468
error = ?err,
469469
"Failed to request quote. We will retry in {} seconds",
470-
wait_time.as_secs_f64()
470+
wait_time.as_secs()
471471
)
472472
})
473473
.await
@@ -493,7 +493,7 @@ impl EventLoopHandle {
493493
tracing::warn!(
494494
error = ?err,
495495
"Failed to request cooperative XMR redeem. We will retry in {} seconds",
496-
wait_time.as_secs_f64()
496+
wait_time.as_secs()
497497
)
498498
})
499499
.await
@@ -526,7 +526,7 @@ impl EventLoopHandle {
526526
tracing::warn!(
527527
error = ?err,
528528
"Failed to send encrypted signature. We will retry in {} seconds",
529-
wait_time.as_secs_f64()
529+
wait_time.as_secs()
530530
)
531531
})
532532
.await

swap/src/protocol/alice/swap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ where
159159
swap_id = %swap_id,
160160
error = ?e,
161161
"Failed to lock Monero. We will retry in {} seconds",
162-
wait_time.as_secs_f64()
162+
wait_time.as_secs()
163163
)
164164
})
165165
.await?;
@@ -311,7 +311,7 @@ where
311311
swap_id = %swap_id,
312312
error = ?e,
313313
"Failed to broadcast Bitcoin redeem transaction. We will retry in {} seconds",
314-
wait_time.as_secs_f64()
314+
wait_time.as_secs()
315315
)
316316
})
317317
.await

0 commit comments

Comments
 (0)