server: update persistent peer addrs from announcements
In this commit, a subscription is made to topology updates. For any NodeAnnouncements received for our peristent peers, we store their newly advertised addresses. If at the time of receiving these new addresses there are any existing connection requests, these are updated to reflect the newly advertised addresses.
This commit is contained in:
2 files changed
+94
-4
No files matched your search
@@ -221,10 +221,10 @@ func testReconnectAfterIPChange(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
[]string{fmt.Sprintf("127.0.0.1:%d", dave.Cfg.P2PPort)},
|
||||
)
|
||||
|
||||
// assert that Dave and Charlie do not reconnect after Dave changes
|
||||
// his P2P address to one not listed in Dave's original advertised list
|
||||
// of addresses. This is a bug that will be fixed in a follow-up commit.
|
||||
assertNotConnected(t, dave, charlie)
|
||||
// assert that Dave and Charlie do reconnect after Dave changes his P2P
|
||||
// address to one not listed in Dave's original advertised list of
|
||||
// addresses.
|
||||
assertConnected(t, dave, charlie)
|
||||
}
|
||||
|
||||
// assertTimeoutError asserts that a connection timeout error is raised. A
|
||||
|
||||
Reference in new issue
Block a user