@@ -14388,11 +14388,9 @@ where
1438814388
1438914389 let invoice_request = match self.flow.verify_invoice_request(invoice_request, context) {
1439014390 Ok(InvreqResponseInstructions::SendInvoice(invoice_request)) => invoice_request,
14391- Ok(InvreqResponseInstructions::SendStaticInvoice {
14392- recipient_id: _recipient_id, invoice_id: _invoice_id
14393- }) => {
14391+ Ok(InvreqResponseInstructions::SendStaticInvoice { recipient_id, invoice_slot }) => {
1439414392 self.pending_events.lock().unwrap().push_back((Event::StaticInvoiceRequested {
14395- recipient_id: _recipient_id, invoice_id: _invoice_id , reply_path: responder
14393+ recipient_id, invoice_slot , reply_path: responder
1439614394 }, None));
1439714395
1439814396 return None
@@ -14514,29 +14512,28 @@ where
1451414512 L::Target: Logger,
1451514513{
1451614514 fn handle_offer_paths_request(
14517- &self, _message : OfferPathsRequest, _context : AsyncPaymentsContext,
14518- _responder : Option<Responder>,
14515+ &self, message : OfferPathsRequest, context : AsyncPaymentsContext,
14516+ responder : Option<Responder>,
1451914517 ) -> Option<(OfferPaths, ResponseInstruction)> {
1452014518 let peers = self.get_peers_for_blinded_path();
14521- let entropy = &*self.entropy_source;
1452214519 let (message, reply_path_context) =
14523- match self.flow.handle_offer_paths_request(_context, peers, entropy ) {
14520+ match self.flow.handle_offer_paths_request(&message, context, peers ) {
1452414521 Some(msg) => msg,
1452514522 None => return None,
1452614523 };
14527- _responder .map(|resp| (message, resp.respond_with_reply_path(reply_path_context)))
14524+ responder .map(|resp| (message, resp.respond_with_reply_path(reply_path_context)))
1452814525 }
1452914526
1453014527 fn handle_offer_paths(
14531- &self, _message : OfferPaths, _context : AsyncPaymentsContext, _responder : Option<Responder>,
14528+ &self, message : OfferPaths, context : AsyncPaymentsContext, responder : Option<Responder>,
1453214529 ) -> Option<(ServeStaticInvoice, ResponseInstruction)> {
14533- let responder = match _responder {
14530+ let responder = match responder {
1453414531 Some(responder) => responder,
1453514532 None => return None,
1453614533 };
1453714534 let (serve_static_invoice, reply_context) = match self.flow.handle_offer_paths(
14538- _message ,
14539- _context ,
14535+ message ,
14536+ context ,
1454014537 responder.clone(),
1454114538 self.get_peers_for_blinded_path(),
1454214539 self.list_usable_channels(),
@@ -14555,52 +14552,51 @@ where
1455514552 }
1455614553
1455714554 fn handle_serve_static_invoice(
14558- &self, _message : ServeStaticInvoice, _context : AsyncPaymentsContext,
14559- _responder : Option<Responder>,
14555+ &self, message : ServeStaticInvoice, context : AsyncPaymentsContext,
14556+ responder : Option<Responder>,
1456014557 ) {
14561- let responder = match _responder {
14558+ let responder = match responder {
1456214559 Some(resp) => resp,
1456314560 None => return,
1456414561 };
1456514562
14566- let (recipient_id, invoice_id ) =
14567- match self.flow.verify_serve_static_invoice_message(&_message, _context ) {
14568- Ok((recipient_id, inv_id )) => (recipient_id, inv_id ),
14563+ let (recipient_id, invoice_slot ) =
14564+ match self.flow.verify_serve_static_invoice_message(&message, context ) {
14565+ Ok((recipient_id, inv_slot )) => (recipient_id, inv_slot ),
1456914566 Err(()) => return,
1457014567 };
1457114568
1457214569 let mut pending_events = self.pending_events.lock().unwrap();
1457314570 pending_events.push_back((
1457414571 Event::PersistStaticInvoice {
14575- invoice: _message .invoice,
14576- invoice_slot: _message.invoice_slot ,
14572+ invoice: message .invoice,
14573+ invoice_slot,
1457714574 recipient_id,
14578- invoice_id,
1457914575 invoice_persisted_path: responder,
1458014576 },
1458114577 None,
1458214578 ));
1458314579 }
1458414580
1458514581 fn handle_static_invoice_persisted(
14586- &self, _message: StaticInvoicePersisted, _context : AsyncPaymentsContext,
14582+ &self, _message: StaticInvoicePersisted, context : AsyncPaymentsContext,
1458714583 ) {
14588- let should_persist = self.flow.handle_static_invoice_persisted(_context );
14584+ let should_persist = self.flow.handle_static_invoice_persisted(context );
1458914585 if should_persist {
1459014586 let _persistence_guard = PersistenceNotifierGuard::notify_on_drop(self);
1459114587 }
1459214588 }
1459314589
1459414590 fn handle_held_htlc_available(
14595- &self, _message: HeldHtlcAvailable, _context : AsyncPaymentsContext,
14596- _responder : Option<Responder>,
14591+ &self, _message: HeldHtlcAvailable, context : AsyncPaymentsContext,
14592+ responder : Option<Responder>,
1459714593 ) -> Option<(ReleaseHeldHtlc, ResponseInstruction)> {
14598- self.flow.verify_inbound_async_payment_context(_context ).ok()?;
14599- return _responder .map(|responder| (ReleaseHeldHtlc {}, responder.respond()));
14594+ self.flow.verify_inbound_async_payment_context(context ).ok()?;
14595+ return responder .map(|responder| (ReleaseHeldHtlc {}, responder.respond()));
1460014596 }
1460114597
14602- fn handle_release_held_htlc(&self, _message: ReleaseHeldHtlc, _context : AsyncPaymentsContext) {
14603- let payment_id = match _context {
14598+ fn handle_release_held_htlc(&self, _message: ReleaseHeldHtlc, context : AsyncPaymentsContext) {
14599+ let payment_id = match context {
1460414600 AsyncPaymentsContext::OutboundPayment { payment_id } => payment_id,
1460514601 _ => return,
1460614602 };
0 commit comments