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.
This commit is contained in:
Matt Morehouse committed 2023-05-17 11:27:41 -05:00
1 parent e59cd7f91d
commit 34186dee19
1 file changed
+3 -6
+3 -6
View File
@@ -1881,8 +1881,9 @@ func (f *Manager) handleFundingAccept(peer lnpeer.Peer,
} else if msg.ChannelType != nil { } else if msg.ChannelType != nil {
// The spec isn't too clear about whether it's okay to set the // 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 // channel type in the accept_channel response if we didn't
// explicitly set it in the open_channel message. For now, let's // explicitly set it in the open_channel message. For now, we
// just log the problem instead of failing the funding flow. // 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( _, implicitCommitType := implicitNegotiateCommitmentType(
peer.LocalFeatures(), peer.RemoteFeatures(), peer.LocalFeatures(), peer.RemoteFeatures(),
) )
@@ -1900,10 +1901,6 @@ func (f *Manager) handleFundingAccept(peer lnpeer.Peer,
return 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 { if implicitCommitType != negotiatedCommitType {
err := errors.New("negotiated unexpected channel type") err := errors.New("negotiated unexpected channel type")
f.failFundingFlow(peer, msg.PendingChannelID, err) f.failFundingFlow(peer, msg.PendingChannelID, err)