mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 18:43:42 +02:00
fundingmanager+lnd: modify WatchNewChannel callback to take in peer key
This commit is contained in:
4
lnd.go
4
lnd.go
@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user