From 34186dee191af054726b971d2ed0da2b0fdb0673 Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Mon, 16 Jan 2023 13:58:47 -0600 Subject: [PATCH] funding: remove incorrect and repetitive comments We don't actually do the logging described in the first comment, and the second comment block repeats much of the first comment block. --- funding/manager.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/funding/manager.go b/funding/manager.go index 76f66eedc..fd1de2426 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -1881,8 +1881,9 @@ func (f *Manager) handleFundingAccept(peer lnpeer.Peer, } else if msg.ChannelType != nil { // The spec isn't too clear about whether it's okay to set the // channel type in the accept_channel response if we didn't - // explicitly set it in the open_channel message. For now, let's - // just log the problem instead of failing the funding flow. + // explicitly set it in the open_channel message. For now, we + // check that it's the same type we'd have arrived through + // implicit negotiation. If it's another type, we fail the flow. _, implicitCommitType := implicitNegotiateCommitmentType( peer.LocalFeatures(), peer.RemoteFeatures(), ) @@ -1900,10 +1901,6 @@ func (f *Manager) handleFundingAccept(peer lnpeer.Peer, return } - // Even though we don't expect a channel type to be set when we - // didn't send one in the first place, we check that it's the - // same type we'd have arrived through implicit negotiation. If - // it's another type, we fail the flow. if implicitCommitType != negotiatedCommitType { err := errors.New("negotiated unexpected channel type") f.failFundingFlow(peer, msg.PendingChannelID, err)