@@ -726,7 +726,10 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
726726 B :: Target : BroadcasterInterface ,
727727 F :: Target : FeeEstimator ,
728728 {
729- log_debug ! ( logger, "Updating claims view at height {} with {} claim requests" , cur_height, requests. len( ) ) ;
729+ if !requests. is_empty ( ) {
730+ log_debug ! ( logger, "Updating claims view at height {} with {} claim requests" , cur_height, requests. len( ) ) ;
731+ }
732+
730733 let mut preprocessed_requests = Vec :: with_capacity ( requests. len ( ) ) ;
731734 let mut aggregated_request = None ;
732735
@@ -772,6 +775,12 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
772775
773776 // Claim everything up to and including `cur_height`
774777 let remaining_locked_packages = self . locktimed_packages . split_off ( & ( cur_height + 1 ) ) ;
778+ if !self . locktimed_packages . is_empty ( ) {
779+ log_debug ! ( logger,
780+ "Updating claims view at height {} with {} locked packages available for claim" ,
781+ cur_height,
782+ self . locktimed_packages. len( ) ) ;
783+ }
775784 for ( pop_height, mut entry) in self . locktimed_packages . iter_mut ( ) {
776785 log_trace ! ( logger, "Restoring delayed claim of package(s) at their timelock at {}." , pop_height) ;
777786 preprocessed_requests. append ( & mut entry) ;
@@ -852,8 +861,15 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
852861 B :: Target : BroadcasterInterface ,
853862 F :: Target : FeeEstimator ,
854863 {
855- log_debug ! ( logger, "Updating claims view at height {} with {} matched transactions in block {}" , cur_height, txn_matched. len( ) , conf_height) ;
864+ let mut have_logged_intro = false ;
865+ let mut maybe_log_intro = || {
866+ if !have_logged_intro {
867+ log_debug ! ( logger, "Updating claims view at height {} with {} matched transactions in block {}" , cur_height, txn_matched. len( ) , conf_height) ;
868+ have_logged_intro = true ;
869+ }
870+ } ;
856871 let mut bump_candidates = new_hash_map ( ) ;
872+ if !txn_matched. is_empty ( ) { maybe_log_intro ( ) ; }
857873 for tx in txn_matched {
858874 // Scan all input to verify is one of the outpoint spent is of interest for us
859875 let mut claimed_outputs_material = Vec :: new ( ) ;
@@ -946,6 +962,7 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
946962 self . onchain_events_awaiting_threshold_conf . drain ( ..) . collect :: < Vec < _ > > ( ) ;
947963 for entry in onchain_events_awaiting_threshold_conf {
948964 if entry. has_reached_confirmation_threshold ( cur_height) {
965+ maybe_log_intro ( ) ;
949966 match entry. event {
950967 OnchainEvent :: Claim { claim_id } => {
951968 // We may remove a whole set of claim outpoints here, as these one may have
@@ -983,7 +1000,11 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
9831000 }
9841001
9851002 // Build, bump and rebroadcast tx accordingly
986- log_trace ! ( logger, "Bumping {} candidates" , bump_candidates. len( ) ) ;
1003+ if !bump_candidates. is_empty ( ) {
1004+ maybe_log_intro ( ) ;
1005+ log_trace ! ( logger, "Bumping {} candidates" , bump_candidates. len( ) ) ;
1006+ }
1007+
9871008 for ( claim_id, request) in bump_candidates. iter ( ) {
9881009 if let Some ( ( new_timer, new_feerate, bump_claim) ) = self . generate_claim (
9891010 cur_height, & request, & FeerateStrategy :: ForceBump , & * fee_estimator, & * logger,
0 commit comments