File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -10591,7 +10591,7 @@ where
10591
10591
}
10592
10592
// We're not allowed to dip below the reserve once we've been above,
10593
10593
// check differently for originally v1 and v2 channels
10594
- if self.is_v2_established () {
10594
+ if self.is_v2 () {
10595
10595
let pre_channel_reserve_sats =
10596
10596
get_v2_channel_reserve_satoshis(pre_channel_value_sats, dust_limit_sats);
10597
10597
if pre_balance_msat >= (pre_channel_reserve_sats * 1000) {
@@ -11386,6 +11386,17 @@ where
11386
11386
// CHANNEL_ANNOUNCEMENT_PROPAGATION_DELAY confirmations.
11387
11387
self.context.historical_scids.drain(0..end)
11388
11388
}
11389
+
11390
+ /// Check is channel is currently v2:
11391
+ /// - established as v2
11392
+ /// - or past a splice (which implicitly makes the channel v2)
11393
+ fn is_v2(&self) -> bool {
11394
+ if self.funding.channel_transaction_parameters.splice_parent_funding_txid.is_some() {
11395
+ true
11396
+ } else {
11397
+ self.is_v2_established()
11398
+ }
11399
+ }
11389
11400
}
11390
11401
11391
11402
/// A not-yet-funded outbound (from holder) channel using V1 channel establishment.
You can’t perform that action at this time.
0 commit comments