@@ -41,7 +41,7 @@ pub async fn refresh_aliasmap(plugin: Plugin<PluginState>) -> Result<(), Error>
4141 }
4242 log:: info!(
4343 "Refreshing alias map done in {}ms!" ,
44- now. elapsed( ) . as_millis( ) . to_string ( )
44+ now. elapsed( ) . as_millis( )
4545 ) ;
4646 time:: sleep ( Duration :: from_secs ( interval) ) . await ;
4747 }
@@ -77,10 +77,7 @@ pub async fn refresh_listpeerchannels(plugin: &Plugin<PluginState>) -> Result<()
7777 . into_iter ( )
7878 . filter_map ( |channel| channel. short_channel_id . map ( |id| ( id, channel) ) )
7979 . collect ( ) ;
80- log:: debug!(
81- "Peerchannels refreshed in {}ms" ,
82- now. elapsed( ) . as_millis( ) . to_string( )
83- ) ;
80+ log:: debug!( "Peerchannels refreshed in {}ms" , now. elapsed( ) . as_millis( ) ) ;
8481 Ok ( ( ) )
8582}
8683
@@ -108,7 +105,7 @@ pub async fn refresh_graph(plugin: Plugin<PluginState>) -> Result<(), Error> {
108105 read_gossip_store ( plugin. clone ( ) , & mut offset) . await ?;
109106 log:: debug!(
110107 "Reading gossip store done after {}ms!" ,
111- now. elapsed( ) . as_millis( ) . to_string ( )
108+ now. elapsed( ) . as_millis( )
112109 ) ;
113110
114111 let mut lngraph = plugin. state ( ) . graph . lock ( ) ;
@@ -120,7 +117,7 @@ pub async fn refresh_graph(plugin: Plugin<PluginState>) -> Result<(), Error> {
120117 . flatten( )
121118 . filter( |( _, y) | y. scid_alias. is_none( ) )
122119 . count( ) ,
123- now. elapsed( ) . as_millis( ) . to_string ( )
120+ now. elapsed( ) . as_millis( )
124121 ) ;
125122
126123 let local_channels = plugin. state ( ) . peer_channels . lock ( ) . clone ( ) ;
@@ -131,7 +128,7 @@ pub async fn refresh_graph(plugin: Plugin<PluginState>) -> Result<(), Error> {
131128 log:: debug!(
132129 "Got {} local channels after {}ms!" ,
133130 local_channels. len( ) ,
134- now. elapsed( ) . as_millis( ) . to_string ( )
131+ now. elapsed( ) . as_millis( )
135132 ) ;
136133 for chan in local_channels. values ( ) {
137134 let private = if let Some ( pri) = chan. private {
@@ -294,15 +291,12 @@ pub async fn refresh_graph(plugin: Plugin<PluginState>) -> Result<(), Error> {
294291 . flatten( )
295292 . filter( |( _, y) | y. scid_alias. is_some( ) )
296293 . count( ) ,
297- now. elapsed( ) . as_millis( ) . to_string ( )
294+ now. elapsed( ) . as_millis( )
298295 ) ;
299296
300297 lngraph. graph . retain ( |_, v| !v. is_empty ( ) ) ;
301298 }
302- log:: debug!(
303- "Refreshed graph in {}ms!" ,
304- now. elapsed( ) . as_millis( ) . to_string( )
305- ) ;
299+ log:: debug!( "Refreshed graph in {}ms!" , now. elapsed( ) . as_millis( ) ) ;
306300 }
307301 time:: sleep ( Duration :: from_secs ( interval) ) . await ;
308302 }
@@ -314,10 +308,7 @@ pub async fn refresh_liquidity(plugin: Plugin<PluginState>) -> Result<(), Error>
314308 let interval = plugin. state ( ) . config . lock ( ) . reset_liquidity_interval ;
315309 let now = Instant :: now ( ) ;
316310 plugin. state ( ) . graph . lock ( ) . refresh_liquidity ( interval) ;
317- log:: info!(
318- "Refreshed Liquidity in {}ms!" ,
319- now. elapsed( ) . as_millis( ) . to_string( )
320- ) ;
311+ log:: info!( "Refreshed Liquidity in {}ms!" , now. elapsed( ) . as_millis( ) ) ;
321312 }
322313 time:: sleep ( Duration :: from_secs ( 120 ) ) . await ;
323314 }
@@ -474,10 +465,7 @@ pub async fn clear_stats(plugin: Plugin<PluginState>) -> Result<(), Error> {
474465 . await ?;
475466 file. write_all ( & content) . await ?;
476467 }
477- log:: debug!(
478- "Pruned stats successfully in {}s!" ,
479- now. elapsed( ) . as_secs( ) . to_string( )
480- ) ;
468+ log:: debug!( "Pruned stats successfully in {}s!" , now. elapsed( ) . as_secs( ) ) ;
481469 }
482470 time:: sleep ( Duration :: from_secs ( 21_600 ) ) . await ;
483471 }
0 commit comments