1124b4556f
This commit fixes a deviant in the way we serialize and deserialize the node announcement message from that which is currently in the spec. Before this commit we reversed the order of features and addresses. Instead, on the wire, features should come _before_ the addresses. We also add a new temporary feature bit to ensure nodes that don’t directly connect to each other if they don’t have this new update. However, this will also partition any current tests nets when new nodes join them as the digest signed has changed, therefore invalidating any older messages. Fixes #207.
21 lines
563 B
Go
21 lines
563 B
Go
package main
|
|
|
|
import "github.com/lightningnetwork/lnd/lnwire"
|
|
|
|
// globalFeatures feature vector which affects HTLCs and thus are also
|
|
// advertised to other nodes.
|
|
var globalFeatures = lnwire.NewFeatureVector([]lnwire.Feature{})
|
|
|
|
// localFeatures is an feature vector which represent the features which
|
|
// only affect the protocol between these two nodes.
|
|
var localFeatures = lnwire.NewFeatureVector([]lnwire.Feature{
|
|
{
|
|
Name: "new-ping-and-funding",
|
|
Flag: lnwire.RequiredFlag,
|
|
},
|
|
{
|
|
Name: "node-ann-feature-addr-swap",
|
|
Flag: lnwire.RequiredFlag,
|
|
},
|
|
})
|