contractcourt: when handling a remote force close, use their view of the HTLC's

This commit is contained in:
Olaoluwa Osuntokun 2018-01-18 14:00:58 -08:00
parent 63f7bf4e65
commit 754d1c1c38
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 6 additions and 0 deletions

View File

@ -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,