@@ -3124,10 +3124,11 @@ impl<SP: Deref> Channel<SP> where
3124
3124
match &htlc_update {
3125
3125
&HTLCUpdateAwaitingACK::AddHTLC {
3126
3126
amount_msat, cltv_expiry, ref payment_hash, ref source, ref onion_routing_packet,
3127
- skimmed_fee_msat, ..
3127
+ skimmed_fee_msat, blinding_point, ..
3128
3128
} => {
3129
3129
match self.send_htlc(amount_msat, *payment_hash, cltv_expiry, source.clone(),
3130
- onion_routing_packet.clone(), false, skimmed_fee_msat, fee_estimator, logger)
3130
+ onion_routing_packet.clone(), false, skimmed_fee_msat, blinding_point, fee_estimator,
3131
+ logger)
3131
3132
{
3132
3133
Ok(_) => update_add_count += 1,
3133
3134
Err(e) => {
@@ -3804,7 +3805,7 @@ impl<SP: Deref> Channel<SP> where
3804
3805
cltv_expiry: htlc.cltv_expiry,
3805
3806
onion_routing_packet: (**onion_packet).clone(),
3806
3807
skimmed_fee_msat: htlc.skimmed_fee_msat,
3807
- blinding_point: None ,
3808
+ blinding_point: htlc.blinding_point ,
3808
3809
});
3809
3810
}
3810
3811
}
@@ -5150,13 +5151,11 @@ impl<SP: Deref> Channel<SP> where
5150
5151
pub fn queue_add_htlc<F: Deref, L: Deref>(
5151
5152
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5152
5153
onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>,
5153
- fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5154
- ) -> Result<(), ChannelError>
5155
- where F::Target: FeeEstimator, L::Target: Logger
5156
- {
5154
+ blinding_point: Option<PublicKey>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5155
+ ) -> Result<(), ChannelError> where F::Target: FeeEstimator, L::Target: Logger {
5157
5156
self
5158
5157
.send_htlc(amount_msat, payment_hash, cltv_expiry, source, onion_routing_packet, true,
5159
- skimmed_fee_msat, fee_estimator, logger)
5158
+ skimmed_fee_msat, blinding_point, fee_estimator, logger)
5160
5159
.map(|msg_opt| assert!(msg_opt.is_none(), "We forced holding cell?"))
5161
5160
.map_err(|err| {
5162
5161
if let ChannelError::Ignore(_) = err { /* fine */ }
@@ -5184,7 +5183,8 @@ impl<SP: Deref> Channel<SP> where
5184
5183
fn send_htlc<F: Deref, L: Deref>(
5185
5184
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32, source: HTLCSource,
5186
5185
onion_routing_packet: msgs::OnionPacket, mut force_holding_cell: bool,
5187
- skimmed_fee_msat: Option<u64>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5186
+ skimmed_fee_msat: Option<u64>, blinding_point: Option<PublicKey>,
5187
+ fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5188
5188
) -> Result<Option<msgs::UpdateAddHTLC>, ChannelError>
5189
5189
where F::Target: FeeEstimator, L::Target: Logger
5190
5190
{
@@ -5241,7 +5241,7 @@ impl<SP: Deref> Channel<SP> where
5241
5241
source,
5242
5242
onion_routing_packet,
5243
5243
skimmed_fee_msat,
5244
- blinding_point: None ,
5244
+ blinding_point,
5245
5245
});
5246
5246
return Ok(None);
5247
5247
}
@@ -5253,7 +5253,7 @@ impl<SP: Deref> Channel<SP> where
5253
5253
cltv_expiry,
5254
5254
state: OutboundHTLCState::LocalAnnounced(Box::new(onion_routing_packet.clone())),
5255
5255
source,
5256
- blinding_point: None ,
5256
+ blinding_point,
5257
5257
skimmed_fee_msat,
5258
5258
});
5259
5259
@@ -5265,7 +5265,7 @@ impl<SP: Deref> Channel<SP> where
5265
5265
cltv_expiry,
5266
5266
onion_routing_packet,
5267
5267
skimmed_fee_msat,
5268
- blinding_point: None ,
5268
+ blinding_point,
5269
5269
};
5270
5270
self.context.next_holder_htlc_id += 1;
5271
5271
@@ -5420,12 +5420,12 @@ impl<SP: Deref> Channel<SP> where
5420
5420
pub fn send_htlc_and_commit<F: Deref, L: Deref>(
5421
5421
&mut self, amount_msat: u64, payment_hash: PaymentHash, cltv_expiry: u32,
5422
5422
source: HTLCSource, onion_routing_packet: msgs::OnionPacket, skimmed_fee_msat: Option<u64>,
5423
- fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5423
+ blinding_point: Option<PublicKey>, fee_estimator: &LowerBoundedFeeEstimator<F>, logger: &L
5424
5424
) -> Result<Option<ChannelMonitorUpdate>, ChannelError>
5425
5425
where F::Target: FeeEstimator, L::Target: Logger
5426
5426
{
5427
5427
let send_res = self.send_htlc(amount_msat, payment_hash, cltv_expiry, source,
5428
- onion_routing_packet, false, skimmed_fee_msat, fee_estimator, logger);
5428
+ onion_routing_packet, false, skimmed_fee_msat, blinding_point, fee_estimator, logger);
5429
5429
if let Err(e) = &send_res { if let ChannelError::Ignore(_) = e {} else { debug_assert!(false, "Sending cannot trigger channel failure"); } }
5430
5430
match send_res? {
5431
5431
Some(_) => {
0 commit comments