Merge pull request #5722 from xanoni/dedupe-pubkey-log-output

server.go: dedupe pubkey output in debug/log msgs
This commit is contained in:
Olaoluwa Osuntokun 2021-09-17 16:28:15 -07:00 committed by GitHub
commit 854d8bcd39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -163,7 +163,7 @@ you.
## Documentation ## Documentation
* [Outdated warning about unsupported pruning was replaced with clarification that LND **does** * [Outdated warning about unsupported pruning was replaced with clarification that LND **does**
support pruning](https://github.com/lightningnetwork/lnd/pull/5553) support pruning](https://github.com/lightningnetwork/lnd/pull/5553).
* [Clarified 'ErrReservedValueInvalidated' error string](https://github.com/lightningnetwork/lnd/pull/5577) * [Clarified 'ErrReservedValueInvalidated' error string](https://github.com/lightningnetwork/lnd/pull/5577)
to explain that the error is triggered by a transaction that would deplete to explain that the error is triggered by a transaction that would deplete
@ -220,24 +220,26 @@ you.
* [Missing dots in cmd interface](https://github.com/lightningnetwork/lnd/pull/5535). * [Missing dots in cmd interface](https://github.com/lightningnetwork/lnd/pull/5535).
* [Link channel point logging](https://github.com/lightningnetwork/lnd/pull/5508) * [Link channel point logging](https://github.com/lightningnetwork/lnd/pull/5508).
* [Canceling the chain notifier no longer logs certain errors](https://github.com/lightningnetwork/lnd/pull/5676) * [Canceling the chain notifier no longer logs certain errors](https://github.com/lightningnetwork/lnd/pull/5676).
* [Fixed context leak in integration tests, and properly handled context * [Fixed context leak in integration tests, and properly handled context
timeout](https://github.com/lightningnetwork/lnd/pull/5646). timeout](https://github.com/lightningnetwork/lnd/pull/5646).
* [Removed nested db tx](https://github.com/lightningnetwork/lnd/pull/5643) * [Removed nested db tx](https://github.com/lightningnetwork/lnd/pull/5643).
* [Fixed wallet recovery itests on Travis ARM](https://github.com/lightningnetwork/lnd/pull/5688) * [Fixed wallet recovery itests on Travis ARM](https://github.com/lightningnetwork/lnd/pull/5688).
* [Integration tests save embedded etcd logs to help debugging flakes](https://github.com/lightningnetwork/lnd/pull/5702) * [Integration tests save embedded etcd logs to help debugging flakes](https://github.com/lightningnetwork/lnd/pull/5702).
* [Fixed restore backup file test flake with bitcoind](https://github.com/lightningnetwork/lnd/pull/5637). * [Fixed restore backup file test flake with bitcoind](https://github.com/lightningnetwork/lnd/pull/5637).
* [Timing fix in AMP itest](https://github.com/lightningnetwork/lnd/pull/5725) * [Timing fix in AMP itest](https://github.com/lightningnetwork/lnd/pull/5725).
* [Upgraded miekg/dns to improve the security posture](https://github.com/lightningnetwork/lnd/pull/5738) * [Upgraded miekg/dns to improve the security posture](https://github.com/lightningnetwork/lnd/pull/5738).
* [server.go: dedupe pubkey output in debug/log msgs](https://github.com/lightningnetwork/lnd/pull/5722).
* [Fixed flakes caused by graph topology subcription](https://github.com/lightningnetwork/lnd/pull/5611). * [Fixed flakes caused by graph topology subcription](https://github.com/lightningnetwork/lnd/pull/5611).

View File

@ -3663,14 +3663,13 @@ func (s *server) ConnectToPeer(addr *lnwire.NetAddress,
// connection. // connection.
if reqs, ok := s.persistentConnReqs[targetPub]; ok { if reqs, ok := s.persistentConnReqs[targetPub]; ok {
srvrLog.Warnf("Already have %d persistent connection "+ srvrLog.Warnf("Already have %d persistent connection "+
"requests for %x@%v, connecting anyway.", len(reqs), "requests for %v, connecting anyway.", len(reqs), addr)
targetPub, addr)
} }
// If there's not already a pending or active connection to this node, // If there's not already a pending or active connection to this node,
// then instruct the connection manager to attempt to establish a // then instruct the connection manager to attempt to establish a
// persistent connection to the peer. // persistent connection to the peer.
srvrLog.Debugf("Connecting to %x@%v", targetPub, addr) srvrLog.Debugf("Connecting to %v", addr)
if perm { if perm {
connReq := &connmgr.ConnReq{ connReq := &connmgr.ConnReq{
Addr: addr, Addr: addr,