@@ -5377,12 +5377,10 @@ where
5377
5377
}
5378
5378
5379
5379
fn check_refresh_async_receive_offer_cache(&self, timer_tick_occurred: bool) {
5380
- let peers = self.get_peers_for_blinded_path();
5381
5380
let channels = self.list_usable_channels();
5382
5381
let entropy = &*self.entropy_source;
5383
5382
let router = &*self.router;
5384
5383
let refresh_res = self.flow.check_refresh_async_receive_offer_cache(
5385
- peers,
5386
5384
channels,
5387
5385
entropy,
5388
5386
router,
@@ -5463,10 +5461,7 @@ where
5463
5461
);
5464
5462
}
5465
5463
} else {
5466
- let reply_path = HeldHtlcReplyPath::ToUs {
5467
- payment_id,
5468
- peers: self.get_peers_for_blinded_path(),
5469
- };
5464
+ let reply_path = HeldHtlcReplyPath::ToUs { payment_id };
5470
5465
let enqueue_held_htlc_available_res =
5471
5466
self.flow.enqueue_held_htlc_available(invoice, reply_path);
5472
5467
if enqueue_held_htlc_available_res.is_err() {
@@ -12232,9 +12227,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12232
12227
/// [`Offer`]: crate::offers::offer::Offer
12233
12228
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
12234
12229
pub fn create_offer_builder(&$self) -> Result<$builder, Bolt12SemanticError> {
12235
- let builder = $self.flow.create_offer_builder(
12236
- &*$self.entropy_source, $self.get_peers_for_blinded_path()
12237
- )?;
12230
+ let builder = $self.flow.create_offer_builder(&*$self.entropy_source)?;
12238
12231
12239
12232
Ok(builder.into())
12240
12233
}
@@ -12257,9 +12250,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12257
12250
where
12258
12251
ME::Target: MessageRouter,
12259
12252
{
12260
- let builder = $self.flow.create_offer_builder_using_router(
12261
- router, &*$self.entropy_source, $self.get_peers_for_blinded_path()
12262
- )?;
12253
+ let builder = $self.flow.create_offer_builder_using_router(router, &*$self.entropy_source)?;
12263
12254
12264
12255
Ok(builder.into())
12265
12256
}
@@ -12313,8 +12304,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12313
12304
let entropy = &*$self.entropy_source;
12314
12305
12315
12306
let builder = $self.flow.create_refund_builder(
12316
- entropy, amount_msats, absolute_expiry,
12317
- payment_id, $self.get_peers_for_blinded_path()
12307
+ entropy, amount_msats, absolute_expiry, payment_id
12318
12308
)?;
12319
12309
12320
12310
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12357,8 +12347,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12357
12347
let entropy = &*$self.entropy_source;
12358
12348
12359
12349
let builder = $self.flow.create_refund_builder_using_router(
12360
- router, entropy, amount_msats, absolute_expiry,
12361
- payment_id, $self.get_peers_for_blinded_path()
12350
+ router, entropy, amount_msats, absolute_expiry, payment_id
12362
12351
)?;
12363
12352
12364
12353
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12430,8 +12419,7 @@ where
12430
12419
pub fn set_paths_to_static_invoice_server(
12431
12420
&self, paths_to_static_invoice_server: Vec<BlindedMessagePath>,
12432
12421
) -> Result<(), ()> {
12433
- let peers = self.get_peers_for_blinded_path();
12434
- self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server, peers)?;
12422
+ self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server)?;
12435
12423
12436
12424
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12437
12425
Ok(())
@@ -12559,10 +12547,7 @@ where
12559
12547
let invoice_request = builder.build_and_sign()?;
12560
12548
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12561
12549
12562
- self.flow.enqueue_invoice_request(
12563
- invoice_request.clone(), payment_id, nonce,
12564
- self.get_peers_for_blinded_path()
12565
- )?;
12550
+ self.flow.enqueue_invoice_request(invoice_request.clone(), payment_id, nonce,)?;
12566
12551
12567
12552
create_pending_payment(&invoice_request, nonce)
12568
12553
}
@@ -12611,7 +12596,7 @@ where
12611
12596
12612
12597
let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
12613
12598
12614
- self.flow.enqueue_invoice(invoice.clone(), refund, self.get_peers_for_blinded_path() )?;
12599
+ self.flow.enqueue_invoice(invoice.clone(), refund)?;
12615
12600
12616
12601
Ok(invoice)
12617
12602
},
@@ -12687,14 +12672,7 @@ where
12687
12672
payer_note,
12688
12673
)?;
12689
12674
12690
- self.flow
12691
- .enqueue_dns_onion_message(
12692
- onion_message,
12693
- context,
12694
- dns_resolvers,
12695
- self.get_peers_for_blinded_path(),
12696
- )
12697
- .map_err(|_| ())
12675
+ self.flow.enqueue_dns_onion_message(onion_message, context, dns_resolvers).map_err(|_| ())
12698
12676
}
12699
12677
12700
12678
/// Gets a payment secret and payment hash for use in an invoice given to a third party wishing
@@ -12835,8 +12813,7 @@ where
12835
12813
pub fn blinded_paths_for_async_recipient(
12836
12814
&self, recipient_id: Vec<u8>, relative_expiry: Option<Duration>,
12837
12815
) -> Result<Vec<BlindedMessagePath>, ()> {
12838
- let peers = self.get_peers_for_blinded_path();
12839
- self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry, peers)
12816
+ self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry)
12840
12817
}
12841
12818
12842
12819
pub(super) fn duration_since_epoch(&self) -> Duration {
@@ -12870,11 +12847,6 @@ where
12870
12847
.collect::<Vec<_>>()
12871
12848
}
12872
12849
12873
- #[cfg(test)]
12874
- pub(super) fn test_get_peers_for_blinded_path(&self) -> Vec<MessageForwardNode> {
12875
- self.get_peers_for_blinded_path()
12876
- }
12877
-
12878
12850
#[cfg(test)]
12879
12851
/// Creates multi-hop blinded payment paths for the given `amount_msats` by delegating to
12880
12852
/// [`Router::create_blinded_payment_paths`].
@@ -14608,9 +14580,8 @@ where
14608
14580
{
14609
14581
let RetryableInvoiceRequest { invoice_request, nonce, .. } = retryable_invoice_request;
14610
14582
14611
- let peers = self.get_peers_for_blinded_path();
14612
14583
let enqueue_invreq_res =
14613
- self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce, peers );
14584
+ self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce);
14614
14585
if enqueue_invreq_res.is_err() {
14615
14586
log_warn!(
14616
14587
self.logger,
@@ -14818,9 +14789,8 @@ where
14818
14789
&self, message: OfferPathsRequest, context: AsyncPaymentsContext,
14819
14790
responder: Option<Responder>,
14820
14791
) -> Option<(OfferPaths, ResponseInstruction)> {
14821
- let peers = self.get_peers_for_blinded_path();
14822
14792
let (message, reply_path_context) =
14823
- match self.flow.handle_offer_paths_request(&message, context, peers ) {
14793
+ match self.flow.handle_offer_paths_request(&message, context) {
14824
14794
Some(msg) => msg,
14825
14795
None => return None,
14826
14796
};
@@ -14838,7 +14808,6 @@ where
14838
14808
message,
14839
14809
context,
14840
14810
responder.clone(),
14841
- self.get_peers_for_blinded_path(),
14842
14811
self.list_usable_channels(),
14843
14812
&*self.entropy_source,
14844
14813
&*self.router,
0 commit comments