lnwire: update NodeAnnouncement to handle multiple addresses

This commit modifies address handling in the NodeAnnouncement struct,
switching from net.TCPAddr to []net.Addr. This enables more flexible
address handling with multiple types and multiple addresses for each
node. This commit addresses the first part of issue #131 .
This commit is contained in:
bryanvu
2017-02-17 01:29:23 -08:00
committed by Olaoluwa Osuntokun
parent 65c15c4cb0
commit 9ffac9eae1
16 changed files with 594 additions and 397 deletions

View File

@@ -693,7 +693,7 @@ func (r *ChannelRouter) processNetworkAnnouncement(msg lnwire.Message) bool {
node := &channeldb.LightningNode{
LastUpdate: msgTimestamp,
Address: msg.Address,
Addresses: msg.Addresses,
PubKey: msg.NodeID,
Alias: msg.Alias.String(),
}
@@ -945,7 +945,7 @@ func (r *ChannelRouter) syncChannelGraph(syncReq *syncRequest) error {
ann := &lnwire.NodeAnnouncement{
Signature: r.fakeSig,
Timestamp: uint32(node.LastUpdate.Unix()),
Address: node.Address,
Addresses: node.Addresses,
NodeID: node.PubKey,
Alias: alias,
}