Skip to content

Commit ea275d2

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 cc9980f commit ea275d2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8654,15 +8654,13 @@ 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,
8657+
next_channel_counterparty_node_id: PublicKey,
86588658
next_channel_outpoint: OutPoint, next_channel_id: ChannelId,
86598659
next_user_channel_id: Option<u128>, attribution_data: Option<AttributionData>,
86608660
send_timestamp: Option<Duration>,
86618661
) {
8662-
debug_assert_eq!(
8663-
startup_replay,
8664-
!self.background_events_processed_since_startup.load(Ordering::Acquire)
8665-
);
8662+
let startup_replay =
8663+
!self.background_events_processed_since_startup.load(Ordering::Acquire);
86668664
let htlc_id = SentHTLCId::from_source(&source);
86678665
match source {
86688666
HTLCSource::OutboundRoute {
@@ -10510,7 +10508,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1051010508
Some(forwarded_htlc_value),
1051110509
skimmed_fee_msat,
1051210510
false,
10513-
false,
1051410511
*counterparty_node_id,
1051510512
funding_txo,
1051610513
msg.channel_id,
@@ -11384,7 +11381,6 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
1138411381
htlc_update.htlc_value_satoshis.map(|v| v * 1000),
1138511382
None,
1138611383
true,
11387-
false,
1138811384
counterparty_node_id,
1138911385
funding_outpoint,
1139011386
channel_id,
@@ -17498,7 +17494,6 @@ where
1749817494
Some(downstream_value),
1749917495
None,
1750017496
downstream_closed,
17501-
true,
1750217497
downstream_node_id,
1750317498
downstream_funding,
1750417499
downstream_channel_id,

0 commit comments

Comments
 (0)