fundingmanager+lnd: modify WatchNewChannel callback to take in peer key

This commit is contained in:
Wilmer Paulino
2018-07-05 13:28:57 -07:00
parent 3ab17063ff
commit 6b1982f50f
2 changed files with 6 additions and 8 deletions

4
lnd.go
View File

@ -450,12 +450,12 @@ func lndMain() error {
return delay
},
WatchNewChannel: func(channel *channeldb.OpenChannel,
addr *lnwire.NetAddress) error {
peerKey *btcec.PublicKey) error {
// First, we'll mark this new peer as a persistent peer
// for re-connection purposes.
server.mu.Lock()
pubStr := string(addr.IdentityKey.SerializeCompressed())
pubStr := string(peerKey.SerializeCompressed())
server.persistentPeers[pubStr] = struct{}{}
server.mu.Unlock()