From 754d1c1c38e71a69b946cd372d67a83c12036218 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 18 Jan 2018 14:00:58 -0800 Subject: [PATCH] contractcourt: when handling a remote force close, use their view of the HTLC's --- contractcourt/channel_arbitrator.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contractcourt/channel_arbitrator.go b/contractcourt/channel_arbitrator.go index 5959041e..ba692b30 100644 --- a/contractcourt/channel_arbitrator.go +++ b/contractcourt/channel_arbitrator.go @@ -1380,6 +1380,12 @@ func (c *ChannelArbitrator) channelAttendant(bestHeight int32, // TODO(roasbeef): modify signal to also detect // cooperative closures? + // As we're now acting upon an event triggered by the + // broadcast of the remote commitment transaction, + // we'll swap out our active HTLC set with the set + // present on their commitment. + c.activeHTLCs = newHtlcSet(uniClosure.RemoteCommit.Htlcs) + // When processing a remote party initiated event, // we'll skip the BroadcastCommit state, and transition // directly to the ContractClosed state. As a result,