match &htlc_update {
&HTLCUpdateAwaitingACK::AddHTLC {
amount_msat, cltv_expiry, ref payment_hash, ref source, ref onion_routing_packet,
- skimmed_fee_msat, ..
+ skimmed_fee_msat, blinding_point, ..
} => {
- match self.send_htlc(amount_msat, *payment_hash, cltv_expiry, source.clone(),
- onion_routing_packet.clone(), false, skimmed_fee_msat, fee_estimator, logger)
- {
+ match self.send_htlc(
+ amount_msat, *payment_hash, cltv_expiry, source.clone(), onion_routing_packet.clone(),
+ false, skimmed_fee_msat, blinding_point, fee_estimator, logger
+ ) {
Ok(_) => update_add_count += 1,
Err(e) => {
match e {
cltv_expiry: htlc.cltv_expiry,
onion_routing_packet: (**onion_packet).clone(),
skimmed_fee_msat: htlc.skimmed_fee_msat,
- blinding_point: None,
+ blinding_point: htlc.blinding_point,
});
}
}
pub fn queue_add_htlc<F: Deref, L: Deref>(
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>,
- fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
+ blinding_point: Option<PublicKey>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
) -> Result<(), ChannelError>
where F::Target: FeeEstimator, L::Target: Logger
{
self
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true,
- skimmed_fee_msat, fee_estimator, logger)
+ skimmed_fee_msat, blinding_point, fee_estimator, logger)
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
.map_err(|err| {
if let ChannelError::Ignore(_) = err { /* fine */ }
fn send_htlc<F: Deref, L: Deref>(
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
onion_routing_packet: msgs::OnionPacket, mut force_holding_cell: bool,
- skimmed_fee_msat: Option<u64>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
+ skimmed_fee_msat: Option<u64>, blinding_point: Option<PublicKey>,
+ fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
) -> Result<Option<msgs::UpdateAddHTLC>, ChannelError>
where F::Target: FeeEstimator, L::Target: Logger
{
source,
onion_routing_packet,
skimmed_fee_msat,
- blinding_point: None,
+ blinding_point,
});
return Ok(None);
}
cltv_expiry,
state: OutboundHTLCState::LocalAnnounced(Box::new(onion_routing_packet.clone())),
source,
- blinding_point: None,
+ blinding_point,
skimmed_fee_msat,
});
cltv_expiry,
onion_routing_packet,
skimmed_fee_msat,
- blinding_point: None,
+ blinding_point,
};
self.context.next_holder_htlc_id += 1;
where F::Target: FeeEstimator, L::Target: Logger
{
let send_res = self.send_htlc(amount_msat, payment_hash, cltv_expiry, source,
- onion_routing_packet, false, skimmed_fee_msat, fee_estimator, logger);
+ onion_routing_packet, false, skimmed_fee_msat, None, fee_estimator, logger);
if let Err(e) = &send_res { if let ChannelError::Ignore(_) = e {} else { debug_assert!(false, "Sending cannot trigger channel failure"); } }
match send_res? {
Some(_) => {