@@ -5384,12 +5384,10 @@ where
5384
5384
}
5385
5385
5386
5386
fn check_refresh_async_receive_offer_cache(&self, timer_tick_occurred: bool) {
5387
- let peers = self.get_peers_for_blinded_path();
5388
5387
let channels = self.list_usable_channels();
5389
5388
let entropy = &*self.entropy_source;
5390
5389
let router = &*self.router;
5391
5390
let refresh_res = self.flow.check_refresh_async_receive_offer_cache(
5392
- peers,
5393
5391
channels,
5394
5392
entropy,
5395
5393
router,
@@ -5470,10 +5468,7 @@ where
5470
5468
);
5471
5469
}
5472
5470
} else {
5473
- let reply_path = HeldHtlcReplyPath::ToUs {
5474
- payment_id,
5475
- peers: self.get_peers_for_blinded_path(),
5476
- };
5471
+ let reply_path = HeldHtlcReplyPath::ToUs { payment_id };
5477
5472
let enqueue_held_htlc_available_res =
5478
5473
self.flow.enqueue_held_htlc_available(invoice, reply_path);
5479
5474
if enqueue_held_htlc_available_res.is_err() {
@@ -12239,9 +12234,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12239
12234
/// [`Offer`]: crate::offers::offer::Offer
12240
12235
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
12241
12236
pub fn create_offer_builder(&$self) -> Result<$builder, Bolt12SemanticError> {
12242
- let builder = $self.flow.create_offer_builder(
12243
- &*$self.entropy_source, $self.get_peers_for_blinded_path()
12244
- )?;
12237
+ let builder = $self.flow.create_offer_builder(&*$self.entropy_source)?;
12245
12238
12246
12239
Ok(builder.into())
12247
12240
}
@@ -12264,9 +12257,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12264
12257
where
12265
12258
ME::Target: MessageRouter,
12266
12259
{
12267
- let builder = $self.flow.create_offer_builder_using_router(
12268
- router, &*$self.entropy_source, $self.get_peers_for_blinded_path()
12269
- )?;
12260
+ let builder = $self.flow.create_offer_builder_using_router(router, &*$self.entropy_source)?;
12270
12261
12271
12262
Ok(builder.into())
12272
12263
}
@@ -12320,8 +12311,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12320
12311
let entropy = &*$self.entropy_source;
12321
12312
12322
12313
let builder = $self.flow.create_refund_builder(
12323
- entropy, amount_msats, absolute_expiry,
12324
- payment_id, $self.get_peers_for_blinded_path()
12314
+ entropy, amount_msats, absolute_expiry, payment_id
12325
12315
)?;
12326
12316
12327
12317
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12364,8 +12354,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12364
12354
let entropy = &*$self.entropy_source;
12365
12355
12366
12356
let builder = $self.flow.create_refund_builder_using_router(
12367
- router, entropy, amount_msats, absolute_expiry,
12368
- payment_id, $self.get_peers_for_blinded_path()
12357
+ router, entropy, amount_msats, absolute_expiry, payment_id
12369
12358
)?;
12370
12359
12371
12360
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12437,8 +12426,7 @@ where
12437
12426
pub fn set_paths_to_static_invoice_server(
12438
12427
&self, paths_to_static_invoice_server: Vec<BlindedMessagePath>,
12439
12428
) -> Result<(), ()> {
12440
- let peers = self.get_peers_for_blinded_path();
12441
- self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server, peers)?;
12429
+ self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server)?;
12442
12430
12443
12431
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12444
12432
Ok(())
@@ -12566,10 +12554,7 @@ where
12566
12554
let invoice_request = builder.build_and_sign()?;
12567
12555
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12568
12556
12569
- self.flow.enqueue_invoice_request(
12570
- invoice_request.clone(), payment_id, nonce,
12571
- self.get_peers_for_blinded_path()
12572
- )?;
12557
+ self.flow.enqueue_invoice_request(invoice_request.clone(), payment_id, nonce,)?;
12573
12558
12574
12559
create_pending_payment(&invoice_request, nonce)
12575
12560
}
@@ -12618,7 +12603,7 @@ where
12618
12603
12619
12604
let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
12620
12605
12621
- self.flow.enqueue_invoice(invoice.clone(), refund, self.get_peers_for_blinded_path() )?;
12606
+ self.flow.enqueue_invoice(invoice.clone(), refund)?;
12622
12607
12623
12608
Ok(invoice)
12624
12609
},
@@ -12694,14 +12679,7 @@ where
12694
12679
payer_note,
12695
12680
)?;
12696
12681
12697
- self.flow
12698
- .enqueue_dns_onion_message(
12699
- onion_message,
12700
- context,
12701
- dns_resolvers,
12702
- self.get_peers_for_blinded_path(),
12703
- )
12704
- .map_err(|_| ())
12682
+ self.flow.enqueue_dns_onion_message(onion_message, context, dns_resolvers).map_err(|_| ())
12705
12683
}
12706
12684
12707
12685
/// Gets a payment secret and payment hash for use in an invoice given to a third party wishing
@@ -12842,8 +12820,7 @@ where
12842
12820
pub fn blinded_paths_for_async_recipient(
12843
12821
&self, recipient_id: Vec<u8>, relative_expiry: Option<Duration>,
12844
12822
) -> Result<Vec<BlindedMessagePath>, ()> {
12845
- let peers = self.get_peers_for_blinded_path();
12846
- self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry, peers)
12823
+ self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry)
12847
12824
}
12848
12825
12849
12826
pub(super) fn duration_since_epoch(&self) -> Duration {
@@ -12877,11 +12854,6 @@ where
12877
12854
.collect::<Vec<_>>()
12878
12855
}
12879
12856
12880
- #[cfg(test)]
12881
- pub(super) fn test_get_peers_for_blinded_path(&self) -> Vec<MessageForwardNode> {
12882
- self.get_peers_for_blinded_path()
12883
- }
12884
-
12885
12857
#[cfg(test)]
12886
12858
/// Creates multi-hop blinded payment paths for the given `amount_msats` by delegating to
12887
12859
/// [`Router::create_blinded_payment_paths`].
@@ -14615,9 +14587,8 @@ where
14615
14587
{
14616
14588
let RetryableInvoiceRequest { invoice_request, nonce, .. } = retryable_invoice_request;
14617
14589
14618
- let peers = self.get_peers_for_blinded_path();
14619
14590
let enqueue_invreq_res =
14620
- self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce, peers );
14591
+ self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce);
14621
14592
if enqueue_invreq_res.is_err() {
14622
14593
log_warn!(
14623
14594
self.logger,
@@ -14825,9 +14796,8 @@ where
14825
14796
&self, message: OfferPathsRequest, context: AsyncPaymentsContext,
14826
14797
responder: Option<Responder>,
14827
14798
) -> Option<(OfferPaths, ResponseInstruction)> {
14828
- let peers = self.get_peers_for_blinded_path();
14829
14799
let (message, reply_path_context) =
14830
- match self.flow.handle_offer_paths_request(&message, context, peers ) {
14800
+ match self.flow.handle_offer_paths_request(&message, context) {
14831
14801
Some(msg) => msg,
14832
14802
None => return None,
14833
14803
};
@@ -14845,7 +14815,6 @@ where
14845
14815
message,
14846
14816
context,
14847
14817
responder.clone(),
14848
- self.get_peers_for_blinded_path(),
14849
14818
self.list_usable_channels(),
14850
14819
&*self.entropy_source,
14851
14820
&*self.router,
0 commit comments