server: set HaveNodeAnnouncement=true for self LightningNode

This commit is contained in:
Johan T. Halseth 2017-07-14 21:40:26 +02:00 committed by Olaoluwa Osuntokun
parent 39a59bbe6f
commit ebbe6d7a10

View File

@ -208,11 +208,12 @@ func newServer(listenAddrs []string, chanDB *channeldb.DB, cc *chainControl,
// TODO(roasbeef): make alias configurable // TODO(roasbeef): make alias configurable
alias := lnwire.NewAlias(hex.EncodeToString(serializedPubKey[:10])) alias := lnwire.NewAlias(hex.EncodeToString(serializedPubKey[:10]))
self := &channeldb.LightningNode{ self := &channeldb.LightningNode{
LastUpdate: time.Now(), HaveNodeAnnouncement: true,
Addresses: selfAddrs, LastUpdate: time.Now(),
PubKey: privKey.PubKey(), Addresses: selfAddrs,
Alias: alias.String(), PubKey: privKey.PubKey(),
Features: globalFeatures, Alias: alias.String(),
Features: globalFeatures,
} }
// If our information has changed since our last boot, then we'll // If our information has changed since our last boot, then we'll