@@ -580,23 +580,17 @@ where
580580
581581 let has_pending_claims = monitor_state. monitor . has_pending_claims ( ) ;
582582 if has_pending_claims || get_partition_key ( channel_id) % partition_factor == 0 {
583- log_trace ! (
584- logger,
585- "Syncing Channel Monitor for channel {}" ,
586- log_funding_info!( monitor)
587- ) ;
583+ log_trace ! ( logger, "Syncing Channel Monitor" ) ;
588584 // Even though we don't track monitor updates from chain-sync as pending, we still want
589585 // updates per-channel to be well-ordered so that users don't see a
590586 // `ChannelMonitorUpdate` after a channel persist for a channel with the same
591587 // `latest_update_id`.
592588 let _pending_monitor_updates = monitor_state. pending_monitor_updates . lock ( ) . unwrap ( ) ;
593589 match self . persister . update_persisted_channel ( monitor. persistence_key ( ) , None , monitor)
594590 {
595- ChannelMonitorUpdateStatus :: Completed => log_trace ! (
596- logger,
597- "Finished syncing Channel Monitor for channel {} for block-data" ,
598- log_funding_info!( monitor)
599- ) ,
591+ ChannelMonitorUpdateStatus :: Completed => {
592+ log_trace ! ( logger, "Finished syncing Channel Monitor for block-data" )
593+ } ,
600594 ChannelMonitorUpdateStatus :: InProgress => {
601595 log_trace ! (
602596 logger,
@@ -961,16 +955,12 @@ where
961955 }
962956 if have_monitors_to_prune {
963957 let mut monitors = self . monitors . write ( ) . unwrap ( ) ;
964- monitors. retain ( |channel_id , monitor_holder| {
958+ monitors. retain ( |_channel_id , monitor_holder| {
965959 let logger = WithChannelMonitor :: from ( & self . logger , & monitor_holder. monitor , None ) ;
966960 let ( is_fully_resolved, _) =
967961 monitor_holder. monitor . check_and_update_full_resolution_status ( & logger) ;
968962 if is_fully_resolved {
969- log_info ! (
970- logger,
971- "Archiving fully resolved ChannelMonitor for channel ID {}" ,
972- channel_id
973- ) ;
963+ log_info ! ( logger, "Archiving fully resolved ChannelMonitor" ) ;
974964 self . persister
975965 . archive_persisted_channel ( monitor_holder. monitor . persistence_key ( ) ) ;
976966 false
@@ -1106,11 +1096,7 @@ where
11061096 } ,
11071097 hash_map:: Entry :: Vacant ( e) => e,
11081098 } ;
1109- log_trace ! (
1110- logger,
1111- "Loaded existing ChannelMonitor for channel {}" ,
1112- log_funding_info!( monitor)
1113- ) ;
1099+ log_trace ! ( logger, "Loaded existing ChannelMonitor" ) ;
11141100 if let Some ( ref chain_source) = self . chain_source {
11151101 monitor. load_outputs_to_watch ( chain_source, & self . logger ) ;
11161102 }
@@ -1366,25 +1352,17 @@ where
13661352 } ,
13671353 hash_map:: Entry :: Vacant ( e) => e,
13681354 } ;
1369- log_trace ! ( logger, "Got new ChannelMonitor for channel {}" , log_funding_info! ( monitor ) ) ;
1355+ log_trace ! ( logger, "Got new ChannelMonitor" ) ;
13701356 let update_id = monitor. get_latest_update_id ( ) ;
13711357 let mut pending_monitor_updates = Vec :: new ( ) ;
13721358 let persist_res = self . persister . persist_new_channel ( monitor. persistence_key ( ) , & monitor) ;
13731359 match persist_res {
13741360 ChannelMonitorUpdateStatus :: InProgress => {
1375- log_info ! (
1376- logger,
1377- "Persistence of new ChannelMonitor for channel {} in progress" ,
1378- log_funding_info!( monitor)
1379- ) ;
1361+ log_info ! ( logger, "Persistence of new ChannelMonitor in progress" , ) ;
13801362 pending_monitor_updates. push ( update_id) ;
13811363 } ,
13821364 ChannelMonitorUpdateStatus :: Completed => {
1383- log_info ! (
1384- logger,
1385- "Persistence of new ChannelMonitor for channel {} completed" ,
1386- log_funding_info!( monitor)
1387- ) ;
1365+ log_info ! ( logger, "Persistence of new ChannelMonitor completed" , ) ;
13881366 } ,
13891367 ChannelMonitorUpdateStatus :: UnrecoverableError => {
13901368 let err_str = "ChannelMonitor[Update] persistence failed unrecoverably. This indicates we cannot continue normal operation and must shut down." ;
@@ -1426,12 +1404,7 @@ where
14261404 Some ( monitor_state) => {
14271405 let monitor = & monitor_state. monitor ;
14281406 let logger = WithChannelMonitor :: from ( & self . logger , & monitor, None ) ;
1429- log_trace ! (
1430- logger,
1431- "Updating ChannelMonitor to id {} for channel {}" ,
1432- update. update_id,
1433- log_funding_info!( monitor)
1434- ) ;
1407+ log_trace ! ( logger, "Updating ChannelMonitor to id {}" , update. update_id, ) ;
14351408
14361409 // We hold a `pending_monitor_updates` lock through `update_monitor` to ensure we
14371410 // have well-ordered updates from the users' point of view. See the
@@ -1452,7 +1425,7 @@ where
14521425 // We don't want to persist a `monitor_update` which results in a failure to apply later
14531426 // while reading `channel_monitor` with updates from storage. Instead, we should persist
14541427 // the entire `channel_monitor` here.
1455- log_warn ! ( logger, "Failed to update ChannelMonitor for channel {} . Going ahead and persisting the entire ChannelMonitor" , log_funding_info! ( monitor ) ) ;
1428+ log_warn ! ( logger, "Failed to update ChannelMonitor. Going ahead and persisting the entire ChannelMonitor" ) ;
14561429 self . persister . update_persisted_channel (
14571430 monitor. persistence_key ( ) ,
14581431 None ,
@@ -1468,18 +1441,17 @@ where
14681441 match persist_res {
14691442 ChannelMonitorUpdateStatus :: InProgress => {
14701443 pending_monitor_updates. push ( update_id) ;
1471- log_debug ! ( logger,
1472- "Persistence of ChannelMonitorUpdate id {:?} for channel {} in progress" ,
1444+ log_debug ! (
1445+ logger,
1446+ "Persistence of ChannelMonitorUpdate id {:?} in progress" ,
14731447 update_id,
1474- log_funding_info!( monitor)
14751448 ) ;
14761449 } ,
14771450 ChannelMonitorUpdateStatus :: Completed => {
14781451 log_debug ! (
14791452 logger,
1480- "Persistence of ChannelMonitorUpdate id {:?} for channel {} completed" ,
1453+ "Persistence of ChannelMonitorUpdate id {:?} completed" ,
14811454 update_id,
1482- log_funding_info!( monitor)
14831455 ) ;
14841456 } ,
14851457 ChannelMonitorUpdateStatus :: UnrecoverableError => {
0 commit comments