@@ -1343,9 +1343,13 @@ 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 > ( & self , filter : & F , logger : & L , )
1347
+ where
1348
+ F :: Target : chain:: Filter , L :: Target : Logger ,
1349
+ {
1347
1350
let lock = self . inner . lock ( ) . unwrap ( ) ;
1348
1351
filter. register_tx ( & lock. get_funding_txo ( ) . 0 . txid , & lock. get_funding_txo ( ) . 1 ) ;
1352
+ log_trace ! ( logger, "registering funding outpoint {:?}" , & lock. get_funding_txo( ) ) ;
1349
1353
for ( txid, outputs) in lock. get_outputs_to_watch ( ) . iter ( ) {
1350
1354
for ( index, script_pubkey) in outputs. iter ( ) {
1351
1355
assert ! ( * index <= u16 :: max_value( ) as u32 ) ;
@@ -1354,6 +1358,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1354
1358
outpoint : OutPoint { txid : * txid, index : * index as u16 } ,
1355
1359
script_pubkey : script_pubkey. clone ( ) ,
1356
1360
} ) ;
1361
+ log_trace ! ( logger, "Adding monitoring for spends of outpoint {}:{} to the filter" , index, txid) ;
1357
1362
}
1358
1363
}
1359
1364
}
@@ -3392,9 +3397,11 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3392
3397
3393
3398
if height > self . best_block . height ( ) {
3394
3399
self . best_block = BestBlock :: new ( block_hash, height) ;
3400
+ log_trace ! ( logger, "Connecting new block {} at height {}" , block_hash, height) ;
3395
3401
self . block_confirmed ( height, block_hash, vec ! [ ] , vec ! [ ] , vec ! [ ] , & broadcaster, & fee_estimator, & logger)
3396
3402
} else if block_hash != self . best_block . block_hash ( ) {
3397
3403
self . best_block = BestBlock :: new ( block_hash, height) ;
3404
+ log_trace ! ( logger, "New block of block hash {} has been found and updated" , block_hash) ;
3398
3405
self . onchain_events_awaiting_threshold_conf . retain ( |ref entry| entry. height <= height) ;
3399
3406
self . onchain_tx_handler . block_disconnected ( height + 1 , broadcaster, fee_estimator, logger) ;
3400
3407
Vec :: new ( )
@@ -3431,6 +3438,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitorImpl<Signer> {
3431
3438
let mut claimable_outpoints = Vec :: new ( ) ;
3432
3439
' tx_iter: for tx in & txn_matched {
3433
3440
let txid = tx. txid ( ) ;
3441
+ log_trace ! ( logger, "Transaction id {} confirmed in block {}" , txid , block_hash) ;
3434
3442
// If a transaction has already been confirmed, ensure we don't bother processing it duplicatively.
3435
3443
if Some ( txid) == self . funding_spend_confirmed {
3436
3444
log_debug ! ( logger, "Skipping redundant processing of funding-spend tx {} as it was previously confirmed" , txid) ;
0 commit comments