File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lightning-liquidity/src/lsps5 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -406,15 +406,15 @@ where
406
406
407
407
let now =
408
408
LSPSDateTime :: new_from_duration_since_epoch ( self . time_provider . duration_since_epoch ( ) ) ;
409
- let cooldown_duration = self . config . notification_cooldown_hours * 3600 ;
410
409
411
410
for ( app_name, webhook) in client_webhooks. iter_mut ( ) {
412
411
if webhook
413
412
. last_notification_sent
414
413
. get ( & notification. method )
415
414
. map ( |last_sent| now. clone ( ) . abs_diff ( & last_sent) )
416
- . map_or ( true , |duration| duration >= cooldown_duration. as_secs ( ) )
417
- {
415
+ . map_or ( true , |duration| {
416
+ duration >= self . config . notification_cooldown_hours . as_secs ( )
417
+ } ) {
418
418
webhook. last_notification_sent . insert ( notification. method . clone ( ) , now. clone ( ) ) ;
419
419
webhook. last_used = now. clone ( ) ;
420
420
self . send_notification (
You can’t perform that action at this time.
0 commit comments