Skip to content

Commit 7878a00

Browse files
check_refresh_static_invoices: remove duration param
Makes the next commit a cleaner code move since the parameter will want to be removed then.
1 parent 5eb8a0f commit 7878a00

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

lightning/src/offers/flow.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,13 +1293,7 @@ where
12931293
core::mem::drop(cache);
12941294

12951295
if timer_tick_occurred {
1296-
self.check_refresh_static_invoices(
1297-
peers,
1298-
usable_channels,
1299-
duration_since_epoch,
1300-
entropy,
1301-
router,
1302-
);
1296+
self.check_refresh_static_invoices(peers, usable_channels, entropy, router);
13031297
}
13041298

13051299
Ok(())
@@ -1309,12 +1303,13 @@ where
13091303
/// server, based on the offers provided by the cache.
13101304
#[cfg(async_payments)]
13111305
fn check_refresh_static_invoices<ES: Deref, R: Deref>(
1312-
&self, peers: Vec<MessageForwardNode>, usable_channels: Vec<ChannelDetails>,
1313-
duration_since_epoch: Duration, entropy: ES, router: R,
1306+
&self, peers: Vec<MessageForwardNode>, usable_channels: Vec<ChannelDetails>, entropy: ES,
1307+
router: R,
13141308
) where
13151309
ES::Target: EntropySource,
13161310
R::Target: Router,
13171311
{
1312+
let duration_since_epoch = self.duration_since_epoch();
13181313
let mut serve_static_invoice_msgs = Vec::new();
13191314
{
13201315
let cache = self.async_receive_offer_cache.lock().unwrap();

0 commit comments

Comments
 (0)