htlcswitch: update getChanID to be aware of FundingLocked

In this commit, we update getChanID to be aware of the FundingLocked
message as it will be retransmitted upon reconnect if both nodes think
that they’re at the very first commitment state.
This commit is contained in:
Olaoluwa Osuntokun 2017-11-10 15:17:33 -08:00
parent cb85b2bd26
commit f39ffd67ef
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -358,8 +358,10 @@ func getChanID(msg lnwire.Message) (lnwire.ChannelID, error) {
chanID = msg.ChanID
case *lnwire.ChannelReestablish:
chanID = msg.ChanID
case *lnwire.FundingLocked:
chanID = msg.ChanID
default:
return chanID, errors.New("unknown type")
return chanID, fmt.Errorf("unknown type: %T", msg)
}
return chanID, nil