autopilot/graph: add addresses to memNode

This commit is contained in:
Johan T. Halseth 2018-12-10 14:56:54 +01:00
parent 4d647b6e5d
commit 55ba5fe654
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

View File

@ -335,6 +335,11 @@ func (m *memChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
if !ok {
vertex1 = memNode{
pub: node1,
addrs: []net.Addr{
&net.TCPAddr{
IP: bytes.Repeat([]byte("a"), 16),
},
},
}
}
} else {
@ -344,6 +349,11 @@ func (m *memChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
}
vertex1 = memNode{
pub: newPub,
addrs: []net.Addr{
&net.TCPAddr{
IP: bytes.Repeat([]byte("a"), 16),
},
},
}
}
@ -352,6 +362,11 @@ func (m *memChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
if !ok {
vertex2 = memNode{
pub: node2,
addrs: []net.Addr{
&net.TCPAddr{
IP: bytes.Repeat([]byte("a"), 16),
},
},
}
}
} else {
@ -361,6 +376,11 @@ func (m *memChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey,
}
vertex2 = memNode{
pub: newPub,
addrs: []net.Addr{
&net.TCPAddr{
IP: bytes.Repeat([]byte("a"), 16),
},
},
}
}