1
0
Fork 0
mirror of https://github.com/lightning/bolts.git synced 2025-03-10 09:10:07 +01:00

Merge pull request #1109 from rustyrussell/define-negotiated

BOLT 1: define what `offered` and `negotiated` mean.
This commit is contained in:
Olaoluwa Osuntokun 2023-10-23 12:07:48 -07:00 committed by GitHub
commit 7620072cef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,6 +255,8 @@ Once authentication is complete, the first message reveals the features supporte
[BOLT #9](09-features.md) specifies lists of features. Each feature is generally represented by 2 bits. The least-significant bit is numbered 0, which is _even_, and the next most significant bit is numbered 1, which is _odd_. For historical reasons, features are divided into global and local feature bitmasks. [BOLT #9](09-features.md) specifies lists of features. Each feature is generally represented by 2 bits. The least-significant bit is numbered 0, which is _even_, and the next most significant bit is numbered 1, which is _odd_. For historical reasons, features are divided into global and local feature bitmasks.
A feature is *offered* if a peer set it in the `init` message for the current connection (as either even or odd). A feature is *negotiated* if either both peers offered it, or the local node offered it as even: it can assume the peer supports it, as it did not disconnect as it would be required to do.
The `features` field MUST be padded to bytes with 0s. The `features` field MUST be padded to bytes with 0s.
1. type: 16 (`init`) 1. type: 16 (`init`)