From a17d161e0c5723cb30481e07f8a738aebf4148f6 Mon Sep 17 00:00:00 2001 From: xanoni <77220130+xanoni@users.noreply.github.com> Date: Tue, 14 Sep 2021 02:37:19 -0400 Subject: [PATCH] server.go: dedupe pubkey output in debug/log msgs Default human readable format of NetAddress already contains pubkey: https://github.com/lightningnetwork/lnd/blob/a329c8061266418bccd797aa5d7d277c736ee930/channeldb/migration/lnwire21/netaddress.go#L38-L47 --- docs/release-notes/release-notes-0.14.0.md | 18 ++++++++++-------- server.go | 5 ++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/release-notes/release-notes-0.14.0.md b/docs/release-notes/release-notes-0.14.0.md index caeb8d38b..985a66ff8 100644 --- a/docs/release-notes/release-notes-0.14.0.md +++ b/docs/release-notes/release-notes-0.14.0.md @@ -163,7 +163,7 @@ you. ## Documentation * [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) 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). -* [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 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). -* [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). ## Database diff --git a/server.go b/server.go index b8d711529..d778844eb 100644 --- a/server.go +++ b/server.go @@ -3659,14 +3659,13 @@ func (s *server) ConnectToPeer(addr *lnwire.NetAddress, // connection. if reqs, ok := s.persistentConnReqs[targetPub]; ok { srvrLog.Warnf("Already have %d persistent connection "+ - "requests for %x@%v, connecting anyway.", len(reqs), - targetPub, addr) + "requests for %v, connecting anyway.", len(reqs), addr) } // If there's not already a pending or active connection to this node, // then instruct the connection manager to attempt to establish a // persistent connection to the peer. - srvrLog.Debugf("Connecting to %x@%v", targetPub, addr) + srvrLog.Debugf("Connecting to %v", addr) if perm { connReq := &connmgr.ConnReq{ Addr: addr,