@@ -14317,11 +14317,9 @@ where
14317
14317
14318
14318
let invoice_request = match self.flow.verify_invoice_request(invoice_request, context) {
14319
14319
Ok(InvreqResponseInstructions::SendInvoice(invoice_request)) => invoice_request,
14320
- Ok(InvreqResponseInstructions::SendStaticInvoice {
14321
- recipient_id: _recipient_id, invoice_id: _invoice_id
14322
- }) => {
14320
+ Ok(InvreqResponseInstructions::SendStaticInvoice { recipient_id, invoice_id }) => {
14323
14321
self.pending_events.lock().unwrap().push_back((Event::StaticInvoiceRequested {
14324
- recipient_id: _recipient_id , invoice_id: _invoice_id , reply_path: responder
14322
+ recipient_id, invoice_id, reply_path: responder
14325
14323
}, None));
14326
14324
14327
14325
return None
@@ -14443,29 +14441,29 @@ where
14443
14441
L::Target: Logger,
14444
14442
{
14445
14443
fn handle_offer_paths_request(
14446
- &self, _message: OfferPathsRequest, _context : AsyncPaymentsContext,
14447
- _responder : Option<Responder>,
14444
+ &self, _message: OfferPathsRequest, context : AsyncPaymentsContext,
14445
+ responder : Option<Responder>,
14448
14446
) -> Option<(OfferPaths, ResponseInstruction)> {
14449
14447
let peers = self.get_peers_for_blinded_path();
14450
14448
let entropy = &*self.entropy_source;
14451
14449
let (message, reply_path_context) =
14452
- match self.flow.handle_offer_paths_request(_context , peers, entropy) {
14450
+ match self.flow.handle_offer_paths_request(context , peers, entropy) {
14453
14451
Some(msg) => msg,
14454
14452
None => return None,
14455
14453
};
14456
- _responder .map(|resp| (message, resp.respond_with_reply_path(reply_path_context)))
14454
+ responder .map(|resp| (message, resp.respond_with_reply_path(reply_path_context)))
14457
14455
}
14458
14456
14459
14457
fn handle_offer_paths(
14460
- &self, _message : OfferPaths, _context : AsyncPaymentsContext, _responder : Option<Responder>,
14458
+ &self, message : OfferPaths, context : AsyncPaymentsContext, responder : Option<Responder>,
14461
14459
) -> Option<(ServeStaticInvoice, ResponseInstruction)> {
14462
- let responder = match _responder {
14460
+ let responder = match responder {
14463
14461
Some(responder) => responder,
14464
14462
None => return None,
14465
14463
};
14466
14464
let (serve_static_invoice, reply_context) = match self.flow.handle_offer_paths(
14467
- _message ,
14468
- _context ,
14465
+ message ,
14466
+ context ,
14469
14467
responder.clone(),
14470
14468
self.get_peers_for_blinded_path(),
14471
14469
self.list_usable_channels(),
@@ -14484,25 +14482,25 @@ where
14484
14482
}
14485
14483
14486
14484
fn handle_serve_static_invoice(
14487
- &self, _message : ServeStaticInvoice, _context : AsyncPaymentsContext,
14488
- _responder : Option<Responder>,
14485
+ &self, message : ServeStaticInvoice, context : AsyncPaymentsContext,
14486
+ responder : Option<Responder>,
14489
14487
) {
14490
- let responder = match _responder {
14488
+ let responder = match responder {
14491
14489
Some(resp) => resp,
14492
14490
None => return,
14493
14491
};
14494
14492
14495
14493
let (recipient_id, invoice_id) =
14496
- match self.flow.verify_serve_static_invoice_message(&_message, _context ) {
14494
+ match self.flow.verify_serve_static_invoice_message(&message, context ) {
14497
14495
Ok((recipient_id, inv_id)) => (recipient_id, inv_id),
14498
14496
Err(()) => return,
14499
14497
};
14500
14498
14501
14499
let mut pending_events = self.pending_events.lock().unwrap();
14502
14500
pending_events.push_back((
14503
14501
Event::PersistStaticInvoice {
14504
- invoice: _message .invoice,
14505
- invoice_slot: _message .invoice_slot,
14502
+ invoice: message .invoice,
14503
+ invoice_slot: message .invoice_slot,
14506
14504
recipient_id,
14507
14505
invoice_id,
14508
14506
invoice_persisted_path: responder,
@@ -14512,24 +14510,24 @@ where
14512
14510
}
14513
14511
14514
14512
fn handle_static_invoice_persisted(
14515
- &self, _message: StaticInvoicePersisted, _context : AsyncPaymentsContext,
14513
+ &self, _message: StaticInvoicePersisted, context : AsyncPaymentsContext,
14516
14514
) {
14517
- let should_persist = self.flow.handle_static_invoice_persisted(_context );
14515
+ let should_persist = self.flow.handle_static_invoice_persisted(context );
14518
14516
if should_persist {
14519
14517
let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
14520
14518
}
14521
14519
}
14522
14520
14523
14521
fn handle_held_htlc_available(
14524
- &self, _message: HeldHtlcAvailable, _context : AsyncPaymentsContext,
14525
- _responder : Option<Responder>,
14522
+ &self, _message: HeldHtlcAvailable, context : AsyncPaymentsContext,
14523
+ responder : Option<Responder>,
14526
14524
) -> Option<(ReleaseHeldHtlc, ResponseInstruction)> {
14527
- self.flow.verify_inbound_async_payment_context(_context ).ok()?;
14528
- return _responder .map(|responder| (ReleaseHeldHtlc {}, responder.respond()));
14525
+ self.flow.verify_inbound_async_payment_context(context ).ok()?;
14526
+ return responder .map(|responder| (ReleaseHeldHtlc {}, responder.respond()));
14529
14527
}
14530
14528
14531
- fn handle_release_held_htlc(&self, _message: ReleaseHeldHtlc, _context : AsyncPaymentsContext) {
14532
- let payment_id = match _context {
14529
+ fn handle_release_held_htlc(&self, _message: ReleaseHeldHtlc, context : AsyncPaymentsContext) {
14530
+ let payment_id = match context {
14533
14531
AsyncPaymentsContext::OutboundPayment { payment_id } => payment_id,
14534
14532
_ => return,
14535
14533
};
0 commit comments