Skip to content

Commit

Permalink
fetchinvoice: try to connect to note if we can't find a path for mess…
Browse files Browse the repository at this point in the history
…ages.

This also adds a `fetchinvoice-noconnect` option to suppress it too.

Signed-off-by: Rusty Russell <[email protected]>
Changelog-EXPERIMENTAL: `fetchinvoice` and `sendinvoice` will connect directly if they can't find an onionmessage route.
Fixes: ElementsProject#4624
  • Loading branch information
rustyrussell committed Jun 30, 2021
1 parent 8167af5 commit 01d84f5
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 64 deletions.
7 changes: 6 additions & 1 deletion doc/lightning-fetchinvoice.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions doc/lightning-fetchinvoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ The **fetchinvoice** RPC command contacts the issuer of an *offer* to get
an actual invoice that can be paid. It highlights any changes between the
offer and the returned invoice.

If **fetchinvoice-noconnect** is not specified in the configuation, it
will connect to the destination in the (currently common!) case where it
cannot find a route which supports `option_onion_messages`.

The offer must not contain *send_invoice*; see lightning-sendinvoice(7).

*msatoshi* is required if the *offer* does not specify
Expand Down
4 changes: 2 additions & 2 deletions doc/lightning-offerout.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/lightning-offerout.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Rusty Russell <<[email protected]>> is mainly responsible.
SEE ALSO
--------

lightning-offer(7), lightning-listoffers(7), lightning-disableoffer(7).
lightning-sendinvoice(7), lightning-offer(7), lightning-listoffers(7), lightning-disableoffer(7).

RESOURCES
---------
Expand Down
9 changes: 7 additions & 2 deletions doc/lightning-sendinvoice.7

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion doc/lightning-sendinvoice.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SYNOPSIS

**(WARNING: experimental-offers only)**

**sendinvoice** *offer* \[*label*\] \[*msatoshi*\] \[*timeout*\] \[*quantity*\]
**sendinvoice** *offer* *label* \[*msatoshi*\] \[*timeout*\] \[*quantity*\]

DESCRIPTION
-----------
Expand All @@ -15,6 +15,10 @@ The **sendinvoice** RPC command creates and sends an invoice to the
issuer of an *offer* for it to pay: the offer must contain
*send_invoice*; see lightning-fetchinvoice(7).

If **fetchinvoice-noconnect** is not specified in the configuation, it
will connect to the destination in the (currently common!) case where it
cannot find a route which supports `option_onion_messages`.

*offer* is the bolt12 offer string beginning with "lno1".

*label* is the unique label to use for this invoice.
Expand Down
9 changes: 8 additions & 1 deletion doc/lightningd-config.5
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,13 @@ This usually requires \fBexperimental-onion-messages\fR as well\. See
\fBlightning-offer\fR(7) and \fBlightning-fetchinvoice\fR(7)\.


\fBfetchinvoice-noconnect\fR


Specifying this prevents \fBfetchinvoice\fR and \fBsendinvoice\fR from
trying to connect directly to the offering node as a last resort\.


\fBexperimental-shutdown-wrong-funding\fR


Expand Down Expand Up @@ -628,4 +635,4 @@ Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
Note: the modules in the ccan/ directory have their own licenses, but
the rest of the code is covered by the BSD-style MIT license\.

\" SHA256STAMP:bfe9e4072bd1a50f5c8553290240eb942298bfdcd823202d1c75d05d66401820
\" SHA256STAMP:045c5a097ff88aab9812ba0f5f443d67beca4c4fb300c1052be8248404351a8b
5 changes: 5 additions & 0 deletions doc/lightningd-config.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ corresponding functionality, which are in draft status as BOLT12.
This usually requires **experimental-onion-messages** as well. See
lightning-offer(7) and lightning-fetchinvoice(7).

**fetchinvoice-noconnect**

Specifying this prevents `fetchinvoice` and `sendinvoice` from
trying to connect directly to the offering node as a last resort.

**experimental-shutdown-wrong-funding**

Specifying this allows the `wrong_funding` field in shutdown: if a
Expand Down
Loading

0 comments on commit 01d84f5

Please sign in to comment.