@@ -3002,7 +3002,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
30023002 // Assume that the broadcasted commitment transaction confirmed in the current best
30033003 // block. Even if not, its a reasonable metric for the bump criteria on the HTLC
30043004 // transactions.
3005- let ( claim_reqs, _) = self . get_broadcasted_holder_claims ( & holder_commitment_tx) ;
3005+ let ( claim_reqs, _) = self . get_broadcasted_holder_claims ( & holder_commitment_tx, self . best_block . height ) ;
30063006 let conf_target = self . closure_conf_target ( ) ;
30073007 self . onchain_tx_handler . update_claims_view_from_requests ( claim_reqs, self . best_block . height , self . best_block . height , broadcaster, conf_target, fee_estimator, logger) ;
30083008 }
@@ -3041,7 +3041,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
30413041 // assuming it gets confirmed in the next block. Sadly, we have code which considers
30423042 // "not yet confirmed" things as discardable, so we cannot do that here.
30433043 let ( mut new_outpoints, _) = self . get_broadcasted_holder_claims (
3044- & self . current_holder_commitment_tx ,
3044+ & self . current_holder_commitment_tx , self . best_block . height ,
30453045 ) ;
30463046 let unsigned_commitment_tx = self . onchain_tx_handler . get_unsigned_holder_commitment_tx ( ) ;
30473047 let new_outputs = self . get_broadcasted_holder_watch_outputs (
@@ -3666,7 +3666,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
36663666 // Returns (1) `PackageTemplate`s that can be given to the OnchainTxHandler, so that the handler can
36673667 // broadcast transactions claiming holder HTLC commitment outputs and (2) a holder revokable
36683668 // script so we can detect whether a holder transaction has been seen on-chain.
3669- fn get_broadcasted_holder_claims ( & self , holder_tx : & HolderSignedTx ) -> ( Vec < PackageTemplate > , Option < ( ScriptBuf , PublicKey , RevocationKey ) > ) {
3669+ fn get_broadcasted_holder_claims ( & self , holder_tx : & HolderSignedTx , _conf_height : u32 ) -> ( Vec < PackageTemplate > , Option < ( ScriptBuf , PublicKey , RevocationKey ) > ) {
36703670 let mut claim_requests = Vec :: with_capacity ( holder_tx. htlc_outputs . len ( ) ) ;
36713671
36723672 let redeemscript = chan_utils:: get_revokeable_redeemscript ( & holder_tx. revocation_key , self . on_holder_tx_csv , & holder_tx. delayed_payment_key ) ;
@@ -3737,7 +3737,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
37373737 if self . current_holder_commitment_tx . txid == commitment_txid {
37383738 is_holder_tx = true ;
37393739 log_info ! ( logger, "Got broadcast of latest holder commitment tx {}, searching for available HTLCs to claim" , commitment_txid) ;
3740- let res = self . get_broadcasted_holder_claims ( & self . current_holder_commitment_tx ) ;
3740+ let res = self . get_broadcasted_holder_claims ( & self . current_holder_commitment_tx , height ) ;
37413741 let mut to_watch = self . get_broadcasted_holder_watch_outputs ( & self . current_holder_commitment_tx , tx) ;
37423742 append_onchain_update ! ( res, to_watch) ;
37433743 fail_unbroadcast_htlcs ! ( self , "latest holder" , commitment_txid, tx, height,
@@ -3747,7 +3747,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
37473747 if holder_tx. txid == commitment_txid {
37483748 is_holder_tx = true ;
37493749 log_info ! ( logger, "Got broadcast of previous holder commitment tx {}, searching for available HTLCs to claim" , commitment_txid) ;
3750- let res = self . get_broadcasted_holder_claims ( holder_tx) ;
3750+ let res = self . get_broadcasted_holder_claims ( holder_tx, height ) ;
37513751 let mut to_watch = self . get_broadcasted_holder_watch_outputs ( holder_tx, tx) ;
37523752 append_onchain_update ! ( res, to_watch) ;
37533753 fail_unbroadcast_htlcs ! ( self , "previous holder" , commitment_txid, tx, height, block_hash,
0 commit comments