Skip to content

Commit ddf777b

Browse files
committed
f rename possibly -> maybe
1 parent a16cd0a commit ddf777b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ pub enum ClaimableBalance {
570570
/// HTLCs which we sent to our counterparty which are claimable after a timeout (less on-chain
571571
/// fees) if the counterparty does not know the preimage for the HTLCs. These are somewhat
572572
/// likely to be claimed by our counterparty before we do.
573-
PossiblyClaimableHTLCAwaitingTimeout {
573+
MaybeClaimableHTLCAwaitingTimeout {
574574
/// The amount available to claim, in satoshis, ignoring the on-chain fees which will be
575575
/// required to do so.
576576
claimable_amount_satoshis: u64,
@@ -1383,7 +1383,7 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
13831383
if us.htlcs_resolved_on_chain.iter().any(|v| v.input_idx == htlc_input_idx) {
13841384
assert!(us.funding_spend_confirmed.is_some());
13851385
} else if htlc.offered == $holder_commitment {
1386-
res.push(ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
1386+
res.push(ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
13871387
claimable_amount_satoshis: htlc.amount_msat / 1000,
13881388
claimable_height: htlc.cltv_expiry,
13891389
});
@@ -1430,7 +1430,7 @@ impl<Signer: Sign> ChannelMonitor<Signer> {
14301430
for (htlc, _, _) in us.current_holder_commitment_tx.htlc_outputs.iter() {
14311431
if htlc.transaction_output_index.is_none() { continue; }
14321432
if htlc.offered {
1433-
res.push(ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
1433+
res.push(ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
14341434
claimable_amount_satoshis: htlc.amount_msat / 1000,
14351435
claimable_height: htlc.cltv_expiry,
14361436
});

lightning/src/ln/monitor_tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn test_claim_value_force_close() {
211211
assert_eq!(sorted_vec(vec![ClaimableBalance::ClaimableOnChannelClose {
212212
claimable_amount_satoshis: 1_000_000 - 3_000 - 1_000 - 3 - chan_feerate *
213213
(channel::COMMITMENT_TX_BASE_WEIGHT + channel::COMMITMENT_TX_WEIGHT_PER_HTLC) / 1000,
214-
}, ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
214+
}, ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
215215
claimable_amount_satoshis: 3_000,
216216
claimable_height: htlc_cltv_timeout,
217217
}]),
@@ -238,7 +238,7 @@ fn test_claim_value_force_close() {
238238
3 - // The dust HTLC value in satoshis
239239
// The commitment transaction fee with one HTLC output:
240240
chan_feerate * (channel::COMMITMENT_TX_BASE_WEIGHT + channel::COMMITMENT_TX_WEIGHT_PER_HTLC) / 1000,
241-
}, ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
241+
}, ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
242242
claimable_amount_satoshis: 3_000,
243243
claimable_height: htlc_cltv_timeout,
244244
}]),
@@ -283,7 +283,7 @@ fn test_claim_value_force_close() {
283283
claimable_amount_satoshis: 1_000_000 - 3_000 - 1_000 - 3 - chan_feerate *
284284
(channel::COMMITMENT_TX_BASE_WEIGHT + channel::COMMITMENT_TX_WEIGHT_PER_HTLC) / 1000,
285285
confirmation_height: nodes[0].best_block_info().1 + ANTI_REORG_DELAY - 1,
286-
}, ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
286+
}, ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
287287
claimable_amount_satoshis: 3_000,
288288
claimable_height: htlc_cltv_timeout,
289289
}]),
@@ -308,7 +308,7 @@ fn test_claim_value_force_close() {
308308

309309
// After ANTI_REORG_DELAY, A will consider its balance fully spendable and generate a
310310
// `SpendableOutputs` event. However, B still has to wait for the CSV delay.
311-
assert_eq!(vec![ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
311+
assert_eq!(vec![ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
312312
claimable_amount_satoshis: 3_000,
313313
claimable_height: htlc_cltv_timeout,
314314
}],
@@ -337,7 +337,7 @@ fn test_claim_value_force_close() {
337337
// possibly-claimable up to ANTI_REORG_DELAY, at which point it will drop it.
338338
mine_transaction(&nodes[0], &b_broadcast_txn[0]);
339339
expect_payment_sent!(nodes[0], payment_preimage);
340-
assert_eq!(vec![ClaimableBalance::PossiblyClaimableHTLCAwaitingTimeout {
340+
assert_eq!(vec![ClaimableBalance::MaybeClaimableHTLCAwaitingTimeout {
341341
claimable_amount_satoshis: 3_000,
342342
claimable_height: htlc_cltv_timeout,
343343
}],

0 commit comments

Comments
 (0)