@@ -5441,12 +5441,10 @@ where
5441
5441
}
5442
5442
5443
5443
fn check_refresh_async_receive_offer_cache(&self, timer_tick_occurred: bool) {
5444
- let peers = self.get_peers_for_blinded_path();
5445
5444
let channels = self.list_usable_channels();
5446
5445
let entropy = &*self.entropy_source;
5447
5446
let router = &*self.router;
5448
5447
let refresh_res = self.flow.check_refresh_async_receive_offer_cache(
5449
- peers,
5450
5448
channels,
5451
5449
entropy,
5452
5450
router,
@@ -5534,10 +5532,7 @@ where
5534
5532
);
5535
5533
}
5536
5534
} else {
5537
- let reply_path = HeldHtlcReplyPath::ToUs {
5538
- payment_id,
5539
- peers: self.get_peers_for_blinded_path(),
5540
- };
5535
+ let reply_path = HeldHtlcReplyPath::ToUs { payment_id };
5541
5536
let enqueue_held_htlc_available_res =
5542
5537
self.flow.enqueue_held_htlc_available(invoice, reply_path);
5543
5538
if enqueue_held_htlc_available_res.is_err() {
@@ -12264,9 +12259,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12264
12259
/// [`Offer`]: crate::offers::offer::Offer
12265
12260
/// [`InvoiceRequest`]: crate::offers::invoice_request::InvoiceRequest
12266
12261
pub fn create_offer_builder(&$self) -> Result<$builder, Bolt12SemanticError> {
12267
- let builder = $self.flow.create_offer_builder(
12268
- &*$self.entropy_source, $self.get_peers_for_blinded_path()
12269
- )?;
12262
+ let builder = $self.flow.create_offer_builder(&*$self.entropy_source)?;
12270
12263
12271
12264
Ok(builder.into())
12272
12265
}
@@ -12289,9 +12282,7 @@ macro_rules! create_offer_builder { ($self: ident, $builder: ty) => {
12289
12282
where
12290
12283
ME::Target: MessageRouter,
12291
12284
{
12292
- let builder = $self.flow.create_offer_builder_using_router(
12293
- router, &*$self.entropy_source, $self.get_peers_for_blinded_path()
12294
- )?;
12285
+ let builder = $self.flow.create_offer_builder_using_router(router, &*$self.entropy_source)?;
12295
12286
12296
12287
Ok(builder.into())
12297
12288
}
@@ -12345,8 +12336,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12345
12336
let entropy = &*$self.entropy_source;
12346
12337
12347
12338
let builder = $self.flow.create_refund_builder(
12348
- entropy, amount_msats, absolute_expiry,
12349
- payment_id, $self.get_peers_for_blinded_path()
12339
+ entropy, amount_msats, absolute_expiry, payment_id
12350
12340
)?;
12351
12341
12352
12342
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12389,8 +12379,7 @@ macro_rules! create_refund_builder { ($self: ident, $builder: ty) => {
12389
12379
let entropy = &*$self.entropy_source;
12390
12380
12391
12381
let builder = $self.flow.create_refund_builder_using_router(
12392
- router, entropy, amount_msats, absolute_expiry,
12393
- payment_id, $self.get_peers_for_blinded_path()
12382
+ router, entropy, amount_msats, absolute_expiry, payment_id
12394
12383
)?;
12395
12384
12396
12385
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop($self);
@@ -12462,8 +12451,7 @@ where
12462
12451
pub fn set_paths_to_static_invoice_server(
12463
12452
&self, paths_to_static_invoice_server: Vec<BlindedMessagePath>,
12464
12453
) -> Result<(), ()> {
12465
- let peers = self.get_peers_for_blinded_path();
12466
- self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server, peers)?;
12454
+ self.flow.set_paths_to_static_invoice_server(paths_to_static_invoice_server)?;
12467
12455
12468
12456
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12469
12457
Ok(())
@@ -12643,10 +12631,7 @@ where
12643
12631
let invoice_request = builder.build_and_sign()?;
12644
12632
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
12645
12633
12646
- self.flow.enqueue_invoice_request(
12647
- invoice_request.clone(), payment_id, nonce,
12648
- self.get_peers_for_blinded_path()
12649
- )?;
12634
+ self.flow.enqueue_invoice_request(invoice_request.clone(), payment_id, nonce,)?;
12650
12635
12651
12636
let retryable_invoice_request = RetryableInvoiceRequest {
12652
12637
invoice_request: invoice_request.clone(),
@@ -12701,7 +12686,7 @@ where
12701
12686
12702
12687
let invoice = builder.allow_mpp().build_and_sign(secp_ctx)?;
12703
12688
12704
- self.flow.enqueue_invoice(invoice.clone(), refund, self.get_peers_for_blinded_path() )?;
12689
+ self.flow.enqueue_invoice(invoice.clone(), refund)?;
12705
12690
12706
12691
Ok(invoice)
12707
12692
},
@@ -12765,14 +12750,7 @@ where
12765
12750
optional_params.payer_note,
12766
12751
)?;
12767
12752
12768
- self.flow
12769
- .enqueue_dns_onion_message(
12770
- onion_message,
12771
- context,
12772
- dns_resolvers,
12773
- self.get_peers_for_blinded_path(),
12774
- )
12775
- .map_err(|_| ())
12753
+ self.flow.enqueue_dns_onion_message(onion_message, context, dns_resolvers).map_err(|_| ())
12776
12754
}
12777
12755
12778
12756
/// Gets a payment secret and payment hash for use in an invoice given to a third party wishing
@@ -12913,8 +12891,7 @@ where
12913
12891
pub fn blinded_paths_for_async_recipient(
12914
12892
&self, recipient_id: Vec<u8>, relative_expiry: Option<Duration>,
12915
12893
) -> Result<Vec<BlindedMessagePath>, ()> {
12916
- let peers = self.get_peers_for_blinded_path();
12917
- self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry, peers)
12894
+ self.flow.blinded_paths_for_async_recipient(recipient_id, relative_expiry)
12918
12895
}
12919
12896
12920
12897
pub(super) fn duration_since_epoch(&self) -> Duration {
@@ -12948,11 +12925,6 @@ where
12948
12925
.collect::<Vec<_>>()
12949
12926
}
12950
12927
12951
- #[cfg(test)]
12952
- pub(super) fn test_get_peers_for_blinded_path(&self) -> Vec<MessageForwardNode> {
12953
- self.get_peers_for_blinded_path()
12954
- }
12955
-
12956
12928
#[cfg(test)]
12957
12929
/// Creates multi-hop blinded payment paths for the given `amount_msats` by delegating to
12958
12930
/// [`Router::create_blinded_payment_paths`].
@@ -14735,9 +14707,8 @@ where
14735
14707
{
14736
14708
let RetryableInvoiceRequest { invoice_request, nonce, .. } = retryable_invoice_request;
14737
14709
14738
- let peers = self.get_peers_for_blinded_path();
14739
14710
let enqueue_invreq_res =
14740
- self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce, peers );
14711
+ self.flow.enqueue_invoice_request(invoice_request, payment_id, nonce);
14741
14712
if enqueue_invreq_res.is_err() {
14742
14713
log_warn!(
14743
14714
self.logger,
@@ -14945,9 +14916,8 @@ where
14945
14916
&self, message: OfferPathsRequest, context: AsyncPaymentsContext,
14946
14917
responder: Option<Responder>,
14947
14918
) -> Option<(OfferPaths, ResponseInstruction)> {
14948
- let peers = self.get_peers_for_blinded_path();
14949
14919
let (message, reply_path_context) =
14950
- match self.flow.handle_offer_paths_request(&message, context, peers ) {
14920
+ match self.flow.handle_offer_paths_request(&message, context) {
14951
14921
Some(msg) => msg,
14952
14922
None => return None,
14953
14923
};
@@ -14965,7 +14935,6 @@ where
14965
14935
message,
14966
14936
context,
14967
14937
responder.clone(),
14968
- self.get_peers_for_blinded_path(),
14969
14938
self.list_usable_channels(),
14970
14939
&*self.entropy_source,
14971
14940
&*self.router,
0 commit comments