Skip to content

Commit 77026c9

Browse files
committed
Remove redundant startup_replay arg to claim_funds_internal
`startup_replay` should always exactly mirror `background_events_processed_since_startup`, so we should just use that rather than having a dedicated argument for it.
1 parent ba6528f commit 77026c9

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8653,15 +8653,12 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
86538653
fn claim_funds_internal(
86548654
&self, source: HTLCSource, payment_preimage: PaymentPreimage,
86558655
forwarded_htlc_value_msat: Option<u64>, skimmed_fee_msat: Option<u64>, from_onchain: bool,
8656-
startup_replay: bool, next_channel_counterparty_node_id: PublicKey,
8657-
next_channel_outpoint: OutPoint, next_channel_id: ChannelId,
8658-
next_user_channel_id: Option<u128>, attribution_data: Option<AttributionData>,
8659-
send_timestamp: Option<Duration>,
8656+
next_channel_counterparty_node_id: PublicKey, next_channel_outpoint: OutPoint,
8657+
next_channel_id: ChannelId, next_user_channel_id: Option<u128>,
8658+
attribution_data: Option<AttributionData>, send_timestamp: Option<Duration>,
86608659
) {
8661-
debug_assert_eq!(
8662-
startup_replay,
8663-
!self.background_events_processed_since_startup.load(Ordering::Acquire)
8664-
);
8660+
let startup_replay =
8661+
!self.background_events_processed_since_startup.load(Ordering::Acquire);
86658662
let htlc_id = SentHTLCId::from_source(&source);
86668663
match source {
86678664
HTLCSource::OutboundRoute {
@@ -10509,7 +10506,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1050910506
Some(forwarded_htlc_value),
1051010507
skimmed_fee_msat,
1051110508
false,
10512-
false,
1051310509
*counterparty_node_id,
1051410510
funding_txo,
1051510511
msg.channel_id,
@@ -11383,7 +11379,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1138311379
htlc_update.htlc_value_satoshis.map(|v| v * 1000),
1138411380
None,
1138511381
true,
11386-
false,
1138711382
counterparty_node_id,
1138811383
funding_outpoint,
1138911384
channel_id,
@@ -17497,7 +17492,6 @@ where
1749717492
Some(downstream_value),
1749817493
None,
1749917494
downstream_closed,
17500-
true,
1750117495
downstream_node_id,
1750217496
downstream_funding,
1750317497
downstream_channel_id,

0 commit comments

Comments
 (0)