@@ -1343,7 +1343,15 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1343
1343
/// Loads the funding txo and outputs to watch into the given `chain::Filter` by repeatedly
1344
1344
/// calling `chain::Filter::register_output` and `chain::Filter::register_tx` until all outputs
1345
1345
/// have been registered.
1346
- pub fn load_outputs_to_watch < F : Deref > ( & self , filter : & F ) where F :: Target : chain:: Filter {
1346
+ pub fn load_outputs_to_watch < F : Deref , L : Deref > (
1347
+ & self ,
1348
+ filter : & F ,
1349
+ logger : & L ,
1350
+ )
1351
+ where
1352
+ F :: Target : chain:: Filter ,
1353
+ L :: Target : Logger ,
1354
+ {
1347
1355
let lock = self . inner . lock ( ) . unwrap ( ) ;
1348
1356
filter. register_tx ( & lock. get_funding_txo ( ) . 0 . txid , & lock. get_funding_txo ( ) . 1 ) ;
1349
1357
for ( txid, outputs) in lock. get_outputs_to_watch ( ) . iter ( ) {
@@ -1354,6 +1362,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1354
1362
outpoint : OutPoint { txid : * txid, index : * index as u16 } ,
1355
1363
script_pubkey : script_pubkey. clone ( ) ,
1356
1364
} ) ;
1365
+ log_trace ! ( logger, "Adding txid {} to the filter" , txid) ;
1357
1366
}
1358
1367
}
1359
1368
}
@@ -3392,9 +3401,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3392
3401
3393
3402
if height > self . best_block . height ( ) {
3394
3403
self . best_block = BestBlock :: new ( block_hash, height) ;
3404
+ log_trace ! ( logger, "New best_block of height {} has been found and updated" , height) ;
3395
3405
self . block_confirmed ( height, block_hash, vec ! [ ] , vec ! [ ] , vec ! [ ] , & broadcaster, & fee_estimator, & logger)
3396
3406
} else if block_hash != self . best_block . block_hash ( ) {
3397
3407
self . best_block = BestBlock :: new ( block_hash, height) ;
3408
+ log_trace ! ( logger, "New best_block of block hash {} has been found and updated" , block_hash) ;
3398
3409
self . onchain_events_awaiting_threshold_conf . retain ( |ref entry| entry. height <= height) ;
3399
3410
self . onchain_tx_handler . block_disconnected ( height + 1 , broadcaster, fee_estimator, logger) ;
3400
3411
Vec :: new ( )
@@ -3431,6 +3442,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3431
3442
let mut claimable_outpoints = Vec :: new ( ) ;
3432
3443
' tx_iter: for tx in & txn_matched {
3433
3444
let txid = tx. txid ( ) ;
3445
+ log_trace ! ( logger, "Transaction id {} confirmed in block {}" , txid , block_hash) ;
3434
3446
// If a transaction has already been confirmed, ensure we don't bother processing it duplicatively.
3435
3447
if Some ( txid) == self . funding_spend_confirmed {
3436
3448
log_debug ! ( logger, "Skipping redundant processing of funding-spend tx {} as it was previously confirmed" , txid) ;
0 commit comments