fn release_held_htlc(&self, _message: ReleaseHeldHtlc, _context: AsyncPaymentsContext) {}
fn release_pending_messages(&self) -> Vec<(AsyncPaymentsMessage, MessageSendInstructions)> {
- Vec::new()
+ core::mem::take(&mut self.pending_async_payments_messages.lock().unwrap())
}
}
);
}
+ #[cfg(async_payments)] {
+ for (message, instructions) in self.async_payments_handler.release_pending_messages() {
+ let _ = self.send_onion_message_internal(
+ message, instructions, format_args!("when sending AsyncPaymentsMessage")
+ );
+ }
+ }
+
// Enqueue any initiating `CustomMessage`s to send.
for (message, instructions) in self.custom_handler.release_pending_custom_messages() {
let _ = self.send_onion_message_internal(