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:
parent
cb85b2bd26
commit
f39ffd67ef
@ -358,8 +358,10 @@ func getChanID(msg lnwire.Message) (lnwire.ChannelID, error) {
|
|||||||
chanID = msg.ChanID
|
chanID = msg.ChanID
|
||||||
case *lnwire.ChannelReestablish:
|
case *lnwire.ChannelReestablish:
|
||||||
chanID = msg.ChanID
|
chanID = msg.ChanID
|
||||||
|
case *lnwire.FundingLocked:
|
||||||
|
chanID = msg.ChanID
|
||||||
default:
|
default:
|
||||||
return chanID, errors.New("unknown type")
|
return chanID, fmt.Errorf("unknown type: %T", msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
return chanID, nil
|
return chanID, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user