Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thomash-acinq committed Nov 14, 2023
1 parent 91201d8 commit 0500259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private class OfferPayment(replyTo: ActorRef,
private def resolveCompactBlindedPaths(invoice: Bolt12Invoice, toResolve: Seq[PaymentBlindedContactInfo], resolved: Seq[PaymentBlindedRoute]): Behavior[Command] = {
if (toResolve.isEmpty) {
if (resolved.isEmpty) {
// We don't know how to reach any of the blinded paths' introduction nodes.
// We couldn't identify any of the blinded paths' introduction nodes because the scids are unknown.
val scids = invoice.blindedPaths.collect { case PaymentBlindedContactInfo(CompactBlindedPath(scdidDir, _, _), _) => scdidDir.scid }
replyTo ! UnknownShortChannelIds(scids)
} else {
Expand Down Expand Up @@ -185,4 +185,4 @@ private class OfferPayment(replyTo: ActorRef,
resolveCompactBlindedPaths(invoice, toResolve, resolved :+ resolvedPaymentBlindedRoute)
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ case class BlindedRecipient(nodeId: PublicKey,
}

object BlindedRecipient {
/** @param paths the caller must resolve the scid of compact blinded paths, otherwise they will be ignored. */
/**
* @param invoice Bolt invoice. Paths from the invoice must be passed as `paths` with compact paths expanded to include the node id.
* @param paths Payment paths to use to reach the recipient.
*/
def apply(invoice: Bolt12Invoice, paths: Seq[PaymentBlindedRoute], totalAmount: MilliSatoshi, expiry: CltvExpiry, customTlvs: Set[GenericTlv]): BlindedRecipient = {
val blindedHops = paths.map(
path => {
Expand Down

0 comments on commit 0500259

Please sign in to comment.