From f39ffd67ef6e949da98820079353ec65a9f24638 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 10 Nov 2017 15:17:33 -0800 Subject: [PATCH] htlcswitch: update getChanID to be aware of FundingLocked MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- htlcswitch/test_utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go index 6eb61e7a5..e544a0f65 100644 --- a/htlcswitch/test_utils.go +++ b/htlcswitch/test_utils.go @@ -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