mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-19 13:17:32 +02:00
peer: check LocalUnrevokedCommitPoint for nil-ness as it's optional
In this commit, we modify the logWireMessage function to ensure that we don't attempt to nil out the LocalUnrevokedCommitPoint.Curve field unless it's actually set. We need to do this as the field as actually optional, and we may be reading a message from a node that doesn't support the option. Fixes #461.
This commit is contained in:
parent
7a3116f8a9
commit
ce6dee6ee4
1 changed files with 3 additions and 1 deletions
4
peer.go
4
peer.go
|
|
@ -927,7 +927,9 @@ func (p *peer) logWireMessage(msg lnwire.Message, read bool) {
|
|||
|
||||
switch m := msg.(type) {
|
||||
case *lnwire.ChannelReestablish:
|
||||
m.LocalUnrevokedCommitPoint.Curve = nil
|
||||
if m.LocalUnrevokedCommitPoint != nil {
|
||||
m.LocalUnrevokedCommitPoint.Curve = nil
|
||||
}
|
||||
case *lnwire.RevokeAndAck:
|
||||
m.NextRevocationKey.Curve = nil
|
||||
case *lnwire.NodeAnnouncement:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue