File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,9 @@ pub(crate) const COUNTERPARTY_CLAIMABLE_WITHIN_BLOCKS_PINNABLE: u32 = 12;
224
224
/// When we go to force-close a channel because an HTLC is expiring, we should ensure that the
225
225
/// HTLC(s) expiring are not considered pinnable, allowing us to aggregate them with other HTLC(s)
226
226
/// expiring at the same time.
227
- const _HTLCS_NOT_PINNABLE_ON_CLOSE: u32 = CLTV_CLAIM_BUFFER - COUNTERPARTY_CLAIMABLE_WITHIN_BLOCKS_PINNABLE ;
227
+ ///
228
+ /// This is verified here at compile-time by ensuring the difference is positive.
229
+ const _ASSERT_HTLCS_NOT_PINNABLE_ON_CLOSE: u32 = CLTV_CLAIM_BUFFER - COUNTERPARTY_CLAIMABLE_WITHIN_BLOCKS_PINNABLE ;
228
230
229
231
/// If an HTLC expires within this many blocks, force-close the channel to broadcast the
230
232
/// HTLC-Success transaction.
Original file line number Diff line number Diff line change @@ -798,7 +798,7 @@ impl PackageTemplate {
798
798
return false ;
799
799
}
800
800
801
- // First check the types of the inputs and only merge if they are possibly claiming
801
+ // First check the types of the inputs and don't merge if they are possibly claiming
802
802
// from different commitment transactions at the same time.
803
803
// This shouldn't ever happen, but if we do end up with packages trying to claim
804
804
// funds from two different commitment transactions (which cannot possibly be
@@ -831,7 +831,7 @@ impl PackageTemplate {
831
831
return false ;
832
832
}
833
833
834
- // Now check that we only merge packages if we they are both unpinnable or both
834
+ // Now check that we only merge packages if they are both unpinnable or both
835
835
// pinnable.
836
836
let self_pinnable = self_cluster == AggregationCluster :: Pinnable ||
837
837
self . counterparty_spendable_height ( ) <= cur_height + COUNTERPARTY_CLAIMABLE_WITHIN_BLOCKS_PINNABLE ;
You can’t perform that action at this time.
0 commit comments