config: added support, tests for --externalip config option

Minor change to server.go to add ExternalIPs to
channeldb.LightningNode. Also, added a test that utilizes this
functionality and exercises multiple addresses in NodeAnnouncement.
This commit is contained in:
bryanvu
2017-02-22 16:24:22 -08:00
committed by Olaoluwa Osuntokun
parent 9ffac9eae1
commit 654c5ea61a
3 changed files with 78 additions and 6 deletions

View File

@@ -23,7 +23,9 @@ import (
var (
testAddr = &net.TCPAddr{IP: (net.IP)([]byte{0xA, 0x0, 0x0, 0x1}),
Port: 9000}
testAddrs = []net.Addr{testAddr}
anotherAddr, _ = net.ResolveTCPAddr("tcp",
"[2001:db8:85a3:0:0:8a2e:370:7334]:80")
testAddrs = []net.Addr{testAddr, anotherAddr}
randSource = prand.NewSource(time.Now().Unix())
randInts = prand.New(randSource)