Skip to content

Commit c188686

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 41273df commit c188686

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
@@ -8654,15 +8654,12 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
86548654
fn claim_funds_internal(
86558655
&self, source: HTLCSource, payment_preimage: PaymentPreimage,
86568656
forwarded_htlc_value_msat: Option<u64>, skimmed_fee_msat: Option<u64>, from_onchain: bool,
8657-
startup_replay: bool, next_channel_counterparty_node_id: PublicKey,
8658-
next_channel_outpoint: OutPoint, next_channel_id: ChannelId,
8659-
next_user_channel_id: Option<u128>, attribution_data: Option<AttributionData>,
8660-
send_timestamp: Option<Duration>,
8657+
next_channel_counterparty_node_id: PublicKey, next_channel_outpoint: OutPoint,
8658+
next_channel_id: ChannelId, next_user_channel_id: Option<u128>,
8659+
attribution_data: Option<AttributionData>, send_timestamp: Option<Duration>,
86618660
) {
8662-
debug_assert_eq!(
8663-
startup_replay,
8664-
!self.background_events_processed_since_startup.load(Ordering::Acquire)
8665-
);
8661+
let startup_replay =
8662+
!self.background_events_processed_since_startup.load(Ordering::Acquire);
86668663
let htlc_id = SentHTLCId::from_source(&source);
86678664
match source {
86688665
HTLCSource::OutboundRoute {
@@ -10510,7 +10507,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1051010507
Some(forwarded_htlc_value),
1051110508
skimmed_fee_msat,
1051210509
false,
10513-
false,
1051410510
*counterparty_node_id,
1051510511
funding_txo,
1051610512
msg.channel_id,
@@ -11384,7 +11380,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1138411380
htlc_update.htlc_value_satoshis.map(|v| v * 1000),
1138511381
None,
1138611382
true,
11387-
false,
1138811383
counterparty_node_id,
1138911384
funding_outpoint,
1139011385
channel_id,
@@ -17498,7 +17493,6 @@ where
1749817493
Some(downstream_value),
1749917494
None,
1750017495
downstream_closed,
17501-
true,
1750217496
downstream_node_id,
1750317497
downstream_funding,
1750417498
downstream_channel_id,

0 commit comments

Comments
 (0)