@@ -5492,7 +5492,7 @@ where
5492
5492
}
5493
5493
5494
5494
fn claim_funds_internal(&self, source: HTLCSource, payment_preimage: PaymentPreimage,
5495
- forwarded_htlc_value_msat: Option<u64>, from_onchain: bool,
5495
+ forwarded_htlc_value_msat: Option<u64>, from_onchain: bool, startup_replay: bool,
5496
5496
next_channel_counterparty_node_id: Option<PublicKey>, next_channel_outpoint: OutPoint
5497
5497
) {
5498
5498
match source {
@@ -6410,7 +6410,7 @@ where
6410
6410
hash_map::Entry::Vacant(_) => return Err(MsgHandleErrInternal::send_err_msg_no_close(format!("Got a message for a channel from the wrong node! No such channel for the passed counterparty_node_id {}", counterparty_node_id), msg.channel_id))
6411
6411
}
6412
6412
};
6413
- self.claim_funds_internal(htlc_source, msg.payment_preimage.clone(), Some(forwarded_htlc_value), false, Some(*counterparty_node_id), funding_txo);
6413
+ self.claim_funds_internal(htlc_source, msg.payment_preimage.clone(), Some(forwarded_htlc_value), false, false, Some(*counterparty_node_id), funding_txo);
6414
6414
Ok(())
6415
6415
}
6416
6416
@@ -6863,7 +6863,7 @@ where
6863
6863
MonitorEvent::HTLCEvent(htlc_update) => {
6864
6864
if let Some(preimage) = htlc_update.payment_preimage {
6865
6865
log_trace!(self.logger, "Claiming HTLC with preimage {} from our monitor", preimage);
6866
- self.claim_funds_internal(htlc_update.source, preimage, htlc_update.htlc_value_satoshis.map(|v| v * 1000), true, counterparty_node_id, funding_outpoint);
6866
+ self.claim_funds_internal(htlc_update.source, preimage, htlc_update.htlc_value_satoshis.map(|v| v * 1000), true, false, counterparty_node_id, funding_outpoint);
6867
6867
} else {
6868
6868
log_trace!(self.logger, "Failing HTLC with hash {} from our monitor", &htlc_update.payment_hash);
6869
6869
let receiver = HTLCDestination::NextHopChannel { node_id: counterparty_node_id, channel_id: funding_outpoint.to_channel_id() };
@@ -10059,7 +10059,7 @@ where
10059
10059
// don't remember in the `ChannelMonitor` where we got a preimage from, but if the
10060
10060
// channel is closed we just assume that it probably came from an on-chain claim.
10061
10061
channel_manager.claim_funds_internal(source, preimage, Some(downstream_value),
10062
- downstream_closed, downstream_node_id, downstream_funding);
10062
+ downstream_closed, true, downstream_node_id, downstream_funding);
10063
10063
}
10064
10064
10065
10065
//TODO: Broadcast channel update for closed channels, but only after we've made a
0 commit comments