@@ -3021,7 +3021,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
3021
3021
let candidate_source: & Option <Box <HTLCSource >> = & candidate_source;
3022
3022
3023
3023
let source: & HTLCSource = if let Some ( source) = candidate_source {
3024
- & * source
3024
+ source
3025
3025
} else {
3026
3026
continue ;
3027
3027
} ;
@@ -3069,25 +3069,25 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
3069
3069
} ;
3070
3070
}
3071
3071
3072
- if Some ( confirmed_txid) == us. funding . current_counterparty_commitment_txid
3073
- || Some ( confirmed_txid) == us. funding . prev_counterparty_commitment_txid
3072
+ let funding = get_confirmed_funding_scope ! ( us) ;
3073
+
3074
+ if Some ( confirmed_txid) == funding. current_counterparty_commitment_txid
3075
+ || Some ( confirmed_txid) == funding. prev_counterparty_commitment_txid
3074
3076
{
3075
3077
let htlcs = funding. counterparty_claimable_outpoints . get ( & confirmed_txid) . unwrap ( ) ;
3076
3078
walk_htlcs ! (
3077
3079
false ,
3078
- htlcs. iter( ) . filter_map(
3079
- |( a, b) | {
3080
- if let & Some ( ref source) = b {
3081
- Some ( ( a, Some ( & * * source) ) )
3082
- } else {
3083
- None
3084
- }
3080
+ htlcs. iter( ) . filter_map( |( a, b) | {
3081
+ if let & Some ( ref source) = b {
3082
+ Some ( ( a, Some ( & * * source) ) )
3083
+ } else {
3084
+ None
3085
3085
}
3086
- )
3086
+ } )
3087
3087
) ;
3088
- } else if confirmed_txid == us . funding . current_holder_commitment_tx . trust ( ) . txid ( ) {
3088
+ } else if confirmed_txid == funding. current_holder_commitment_tx . trust ( ) . txid ( ) {
3089
3089
walk_htlcs ! ( true , holder_commitment_htlcs!( us, CURRENT_WITH_SOURCES ) ) ;
3090
- } else if let Some ( prev_commitment_tx) = & us . funding . prev_holder_commitment_tx {
3090
+ } else if let Some ( prev_commitment_tx) = & funding. prev_holder_commitment_tx {
3091
3091
if confirmed_txid == prev_commitment_tx. trust ( ) . txid ( ) {
3092
3092
walk_htlcs ! ( true , holder_commitment_htlcs!( us, PREV_WITH_SOURCES ) . unwrap( ) ) ;
3093
3093
} else {
0 commit comments