@@ -1370,17 +1370,24 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1370
1370
/// Loads the funding txo and outputs to watch into the given `chain::Filter` by repeatedly
1371
1371
/// calling `chain::Filter::register_output` and `chain::Filter::register_tx` until all outputs
1372
1372
/// have been registered.
1373
- pub fn load_outputs_to_watch < F : Deref > ( & self , filter : & F ) where F :: Target : chain:: Filter {
1373
+ pub fn load_outputs_to_watch < F : Deref , L : Deref > ( & self , filter : & F , logger : & L )
1374
+ where
1375
+ F :: Target : chain:: Filter , L :: Target : Logger ,
1376
+ {
1374
1377
let lock = self . inner . lock ( ) . unwrap ( ) ;
1375
1378
filter. register_tx ( & lock. get_funding_txo ( ) . 0 . txid , & lock. get_funding_txo ( ) . 1 ) ;
1379
+ log_trace ! ( logger,
1380
+ "Registering funding outpoint {}" , & lock. get_funding_txo( ) . 0 ) ;
1376
1381
for ( txid, outputs) in lock. get_outputs_to_watch ( ) . iter ( ) {
1377
1382
for ( index, script_pubkey) in outputs. iter ( ) {
1378
1383
assert ! ( * index <= u16 :: max_value( ) as u32 ) ;
1384
+ let outpoint = OutPoint { txid : * txid, index : * index as u16 } ;
1379
1385
filter. register_output ( WatchedOutput {
1380
1386
block_hash : None ,
1381
- outpoint : OutPoint { txid : * txid , index : * index as u16 } ,
1387
+ outpoint : outpoint ,
1382
1388
script_pubkey : script_pubkey. clone ( ) ,
1383
1389
} ) ;
1390
+ log_trace ! ( logger, "Adding monitoring for spends of outpoint {} to the filter" , outpoint) ;
1384
1391
}
1385
1392
}
1386
1393
}
@@ -3418,9 +3425,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3418
3425
3419
3426
if height > self . best_block . height ( ) {
3420
3427
self . best_block = BestBlock :: new ( block_hash, height) ;
3428
+ log_trace ! ( logger, "Connecting new block {} at height {}" , block_hash, height) ;
3421
3429
self . block_confirmed ( height, block_hash, vec ! [ ] , vec ! [ ] , vec ! [ ] , & broadcaster, & fee_estimator, & logger)
3422
3430
} else if block_hash != self . best_block . block_hash ( ) {
3423
3431
self . best_block = BestBlock :: new ( block_hash, height) ;
3432
+ log_trace ! ( logger, "New block of block hash {} has been found and updated" , block_hash) ;
3424
3433
self . onchain_events_awaiting_threshold_conf . retain ( |ref entry| entry. height <= height) ;
3425
3434
self . onchain_tx_handler . block_disconnected ( height + 1 , broadcaster, fee_estimator, logger) ;
3426
3435
Vec :: new ( )
@@ -3457,6 +3466,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3457
3466
let mut claimable_outpoints = Vec :: new ( ) ;
3458
3467
' tx_iter: for tx in & txn_matched {
3459
3468
let txid = tx. txid ( ) ;
3469
+ log_trace ! ( logger, "Transaction id {} confirmed in block {}" , txid , block_hash) ;
3460
3470
// If a transaction has already been confirmed, ensure we don't bother processing it duplicatively.
3461
3471
if Some ( txid) == self . funding_spend_confirmed {
3462
3472
log_debug ! ( logger, "Skipping redundant processing of funding-spend tx {} as it was previously confirmed" , txid) ;
0 commit comments