mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 10:09:08 +02:00
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:
committed by
Olaoluwa Osuntokun
parent
65c15c4cb0
commit
9ffac9eae1
@ -135,10 +135,12 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
||||
// We'll use this fake address for the IP address of all the nodes in
|
||||
// our tests. This value isn't needed for path finding so it doesn't
|
||||
// need to be unique.
|
||||
var testAddrs []net.Addr
|
||||
testAddr, err := net.ResolveTCPAddr("tcp", "192.0.0.1:8888")
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
testAddrs = append(testAddrs, testAddr)
|
||||
|
||||
// Next, create a temporary graph database for usage within the test.
|
||||
graph, cleanUp, err := makeTestGraph()
|
||||
@ -162,7 +164,7 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
||||
|
||||
dbNode := &channeldb.LightningNode{
|
||||
LastUpdate: time.Now(),
|
||||
Address: testAddr,
|
||||
Addresses: testAddrs,
|
||||
PubKey: pub,
|
||||
Alias: node.Alias,
|
||||
}
|
||||
|
Reference in New Issue
Block a user