@@ -726,7 +726,10 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
726
726
B :: Target : BroadcasterInterface ,
727
727
F :: Target : FeeEstimator ,
728
728
{
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
+
730
733
let mut preprocessed_requests = Vec :: with_capacity ( requests. len ( ) ) ;
731
734
let mut aggregated_request = None ;
732
735
@@ -772,6 +775,12 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
772
775
773
776
// Claim everything up to and including `cur_height`
774
777
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
+ }
775
784
for ( pop_height, mut entry) in self . locktimed_packages . iter_mut ( ) {
776
785
log_trace ! ( logger, "Restoring delayed claim of package(s) at their timelock at {}." , pop_height) ;
777
786
preprocessed_requests. append ( & mut entry) ;
@@ -852,8 +861,15 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
852
861
B :: Target : BroadcasterInterface ,
853
862
F :: Target : FeeEstimator ,
854
863
{
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
+ } ;
856
871
let mut bump_candidates = new_hash_map ( ) ;
872
+ if !txn_matched. is_empty ( ) { maybe_log_intro ( ) ; }
857
873
for tx in txn_matched {
858
874
// Scan all input to verify is one of the outpoint spent is of interest for us
859
875
let mut claimed_outputs_material = Vec :: new ( ) ;
@@ -946,6 +962,7 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
946
962
self . onchain_events_awaiting_threshold_conf . drain ( ..) . collect :: < Vec < _ > > ( ) ;
947
963
for entry in onchain_events_awaiting_threshold_conf {
948
964
if entry. has_reached_confirmation_threshold ( cur_height) {
965
+ maybe_log_intro ( ) ;
949
966
match entry. event {
950
967
OnchainEvent :: Claim { claim_id } => {
951
968
// We may remove a whole set of claim outpoints here, as these one may have
@@ -983,7 +1000,11 @@ impl<ChannelSigner: WriteableEcdsaChannelSigner> OnchainTxHandler<ChannelSigner>
983
1000
}
984
1001
985
1002
// 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
+
987
1008
for ( claim_id, request) in bump_candidates. iter ( ) {
988
1009
if let Some ( ( new_timer, new_feerate, bump_claim) ) = self . generate_claim (
989
1010
cur_height, & request, & FeerateStrategy :: ForceBump , & * fee_estimator, & * logger,
0 commit comments