mirror of
https://github.com/lightning/bolts.git
synced 2024-11-19 10:00:04 +01:00
Merge pull request #16 from lightningnetwork/flags-in-routing
BOLT 7: Use a flags word, not padding.
This commit is contained in:
commit
bcb03f870f
@ -167,8 +167,7 @@ it wants to change fees.
|
||||
* [64:signature]
|
||||
* [8:channel-id]
|
||||
* [4:timestamp]
|
||||
* [1:side]
|
||||
* [1:pad]
|
||||
* [2:flags]
|
||||
* [2:expiry]
|
||||
* [4:htlc-minimum-msat]
|
||||
* [4:fee-base-msat]
|
||||
@ -180,22 +179,25 @@ The creating node MUST set `signature` to the signature of the
|
||||
double-SHA256 of the entire remaining packet after `signature` using its own `node-id`.
|
||||
|
||||
The creating node MUST set `channel-id` to
|
||||
match those in the already-sent `channel_announcement` message, and MUST set `side` to 0 if the creating node is `node-id-1` in that message, otherwise 1.
|
||||
match those in the already-sent `channel_announcement` message, and MUST set the least-significant bit of `flags` to 0 if the creating node is `node-id-1` in that message, otherwise 1. It MUST set other bits of `flags` to zero.
|
||||
|
||||
The creating node MUST set `timestamp` to greater than zero, and MUST set it to greater than any previously-sent `channel_update` for this channel, and MUST set `pad` to zero.
|
||||
The creating node MUST set `timestamp` to greater than zero, and MUST set it to greater than any previously-sent `channel_update` for this channel.
|
||||
|
||||
It MUST set `expiry` to the number of blocks it will subtract from an incoming HTLC's `expiry`. It MUST set `htlc-minimum-msat` to the minimum HTLC value it will accept, in millisatoshi. It MUST set `fee-base-msat` to the base fee it will charge for any HTLC, in millisatoshi, and `fee-proportional-millionths` to the amount it will charge per millionth of a satoshi.
|
||||
|
||||
The receiving node SHOULD fail the connection if `side` is not 0 or 1.
|
||||
It MUST ignore the contents of `pad`. The receiving node SHOULD fail
|
||||
The receiving node MUST ignore `flags` other than the least significant bit.
|
||||
The receiving node SHOULD fail
|
||||
the connection if `signature` is invalid or incorrect for the entire
|
||||
message including unknown fields following `signature`, and MUST NOT
|
||||
further process the message. The receiving node SHOULD ignore `ipv6`
|
||||
if `port` is zero. It SHOULD ignore the message if `channel-id`does
|
||||
not correspond to a previously
|
||||
known, unspent channel from `channel_announcement` or if `timestamp`
|
||||
known, unspent channel from `channel_announcement`, otherwise the node-id
|
||||
is taken from the `channel_announcement` `node-id-1` if least-significant bit of flags is 0 or `node-id-2` otherwise.
|
||||
|
||||
The receiving node SHOULD ignore the message if `timestamp`
|
||||
is not greater than than the last-received `channel_announcement` for
|
||||
this channel and `side`. Otherwise, if the `timestamp` is equal to
|
||||
this channel and node-id. Otherwise, if the `timestamp` is equal to
|
||||
the last-received `channel_announcement` and the fields other than
|
||||
`signature` differ, the node MAY blacklist this node-id and forget all
|
||||
channels associated with it. Otherwise the receiving node SHOULD
|
||||
|
Loading…
Reference in New Issue
Block a user