mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
doc: Fix sendpay instructions
They were telling people to use the `<amount>`, but that's encoded in the route already. Instead the final parameter is the `<rhash>` which is the only piece of information missing for the transfer. Reported-by: Toshiro Takahashi @toshirot Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
fc59d8e227
commit
f802e98e73
@ -97,11 +97,12 @@ daemon/lightning-cli invoice <amount> <label>
|
||||
This returns a random value called `rhash` that is part of the invoice.
|
||||
The recipient needs to communicate its ID `<recipient_id>`, `<rhash>` and the desired `<amount>` to the sender.
|
||||
|
||||
The sender needs to compute a route to the recipient, and use that route to actually send the payment:
|
||||
The sender needs to compute a route to the recipient, and use that route to actually send the payment.
|
||||
The route contains the path that the payment will take throught the Lightning Network and the respective funds that each node will forward.
|
||||
|
||||
```
|
||||
route=$(daemon/lightning-cli getroute <recipient_id> <amount> 1 | jq --raw-output .route -)
|
||||
daemon/lightning-cli sendpay $route <amount>
|
||||
daemon/lightning-cli sendpay $route <rhash>
|
||||
```
|
||||
|
||||
Notice that in the first step we stored the route in a variable and reused it in the second step.
|
||||
|
Loading…
Reference in New Issue
Block a user