From 97bb8744c47b113fd6f9d03b66f5e482f4261a7c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sun, 22 Jan 2017 14:36:59 -0800 Subject: [PATCH] peer: fix logging message when receiving updates for unknown channel The previous logging message was broken as that target chanpoint was being overshadowed by the local variable declaration. The new logging message will properly print the unknown channel point as well as the peer who sent the message. --- peer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/peer.go b/peer.go index c36c91ac..9e9cf078 100644 --- a/peer.go +++ b/peer.go @@ -450,14 +450,14 @@ out: // Dispatch the commitment update message to the proper // active goroutine dedicated to this channel. p.htlcManMtx.Lock() - targetChan, ok := p.htlcManagers[*targetChan] + channel, ok := p.htlcManagers[*targetChan] p.htlcManMtx.Unlock() if !ok { - peerLog.Errorf("recv'd update for unknown channel %v", - targetChan) + peerLog.Errorf("recv'd update for unknown "+ + "channel %v from %v", targetChan, p) continue } - targetChan <- nextMsg + channel <- nextMsg } }