mirror of
https://github.com/lightning/bolts.git
synced 2025-03-10 17:18:44 +01:00
channel_update: make sure we use alias scids correctly.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7aa76b67b2
commit
f8e5c92fb5
2 changed files with 11 additions and 0 deletions
|
@ -1114,6 +1114,15 @@ An _intermediate hop_ MUST NOT, but the _final node_:
|
||||||
- if the `amt_to_forward` does NOT correspond with the `incoming_htlc_amt` from the
|
- if the `amt_to_forward` does NOT correspond with the `incoming_htlc_amt` from the
|
||||||
final node's HTLC:
|
final node's HTLC:
|
||||||
- MUST return a `final_incorrect_htlc_amount` error.
|
- MUST return a `final_incorrect_htlc_amount` error.
|
||||||
|
- if it returns a `channel_update`:
|
||||||
|
- MUST set `short_channel_id` to the `short_channel_id` used by the incoming onion.
|
||||||
|
|
||||||
|
### Rationale
|
||||||
|
|
||||||
|
In the case of multiple short_channel_id aliases, the `channel_update`
|
||||||
|
`short_channel_id` should refer to the one the original sender is
|
||||||
|
expecting, to both avoid confusion and to avoid leaking information
|
||||||
|
about other aliases (or the real location of the channel UTXO).
|
||||||
|
|
||||||
## Receiving Failure Codes
|
## Receiving Failure Codes
|
||||||
|
|
||||||
|
|
|
@ -449,6 +449,8 @@ The origin node:
|
||||||
- MAY create a `channel_update` to communicate the channel parameters to the
|
- MAY create a `channel_update` to communicate the channel parameters to the
|
||||||
channel peer, even though the channel has not yet been announced (i.e. the
|
channel peer, even though the channel has not yet been announced (i.e. the
|
||||||
`announce_channel` bit was not set).
|
`announce_channel` bit was not set).
|
||||||
|
- MUST set the `short_channel_id` to either an `alias` it has
|
||||||
|
received from the peer, or the real channel `short_channel_id`.
|
||||||
- MUST NOT forward such a `channel_update` to other peers, for privacy
|
- MUST NOT forward such a `channel_update` to other peers, for privacy
|
||||||
reasons.
|
reasons.
|
||||||
- Note: such a `channel_update`, one not preceded by a
|
- Note: such a `channel_update`, one not preceded by a
|
||||||
|
|
Loading…
Add table
Reference in a new issue