File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -12967,19 +12967,20 @@ where
12967
12967
// inbound edge of the payment's monitor has already claimed
12968
12968
// the HTLC) we skip trying to replay the claim.
12969
12969
let htlc_payment_hash: PaymentHash = payment_preimage.into();
12970
- if !inbound_edge_balances.iter().any(|bal| {
12971
- match bal {
12972
- Balance::ClaimableOnChannelClose { .. } => {
12973
- // The channel is still open, assume we can still
12974
- // claim against it
12975
- true
12976
- },
12977
- Balance::MaybePreimageClaimableHTLC { payment_hash, .. } => {
12978
- *payment_hash == htlc_payment_hash
12979
- },
12980
- _ => false,
12981
- }
12982
- }) {
12970
+ let balance_could_incl_htlc = |bal| match bal {
12971
+ Balance::ClaimableOnChannelClose { .. } => {
12972
+ // The channel is still open, assume we can still
12973
+ // claim against it
12974
+ true
12975
+ },
12976
+ Balance::MaybePreimageClaimableHTLC { payment_hash, .. } => {
12977
+ *payment_hash == htlc_payment_hash
12978
+ },
12979
+ _ => false,
12980
+ };
12981
+ let htlc_may_be_in_balances =
12982
+ inbound_edge_balances.iter().any(balance_could_incl_htlc);
12983
+ if !htlc_may_be_in_balances {
12983
12984
return None;
12984
12985
}
12985
12986
You can’t perform that action at this time.
0 commit comments