Skip to content

Commit ef60ffd

Browse files
committed
f style
1 parent 9bce39a commit ef60ffd

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,23 +1385,21 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
13851385
claimable_amount_satoshis: htlc.amount_msat / 1000,
13861386
claimable_height: htlc.cltv_expiry,
13871387
});
1388-
} else {
1389-
if us.payment_preimages.get(&htlc.payment_hash).is_some() {
1390-
if let Some(conf_thresh) = us.onchain_events_awaiting_threshold_conf.iter().find_map(|event| {
1391-
if let OnchainEvent::HTLCSpendConfirmation { input_idx, .. } = event.event {
1392-
if input_idx == htlc_input_idx { Some(event.confirmation_threshold()) } else { None }
1393-
} else { None }
1394-
}) {
1395-
res.push(ClaimableBalance::ClaimableAwaitingConfirmations {
1396-
claimable_amount_satoshis: htlc.amount_msat / 1000,
1397-
confirmation_height: conf_thresh,
1398-
});
1399-
} else {
1400-
res.push(ClaimableBalance::ContentiousClaimable {
1401-
claimable_amount_satoshis: htlc.amount_msat / 1000,
1402-
timeout_height: htlc.cltv_expiry,
1403-
});
1404-
}
1388+
} else if us.payment_preimages.get(&htlc.payment_hash).is_some() {
1389+
if let Some(conf_thresh) = us.onchain_events_awaiting_threshold_conf.iter().find_map(|event| {
1390+
if let OnchainEvent::HTLCSpendConfirmation { input_idx, .. } = event.event {
1391+
if input_idx == htlc_input_idx { Some(event.confirmation_threshold()) } else { None }
1392+
} else { None }
1393+
}) {
1394+
res.push(ClaimableBalance::ClaimableAwaitingConfirmations {
1395+
claimable_amount_satoshis: htlc.amount_msat / 1000,
1396+
confirmation_height: conf_thresh,
1397+
});
1398+
} else {
1399+
res.push(ClaimableBalance::ContentiousClaimable {
1400+
claimable_amount_satoshis: htlc.amount_msat / 1000,
1401+
timeout_height: htlc.cltv_expiry,
1402+
});
14051403
}
14061404
}
14071405
}

0 commit comments

Comments
 (0)