contractcourt: record force and breach close initiator

This commit is contained in:
carla
2020-02-21 13:49:12 +02:00
parent c9915e027e
commit 4eb3036f67
4 changed files with 202 additions and 14 deletions

View File

@@ -284,8 +284,11 @@ func newActiveChannelArbitrator(channel *channeldb.OpenChannel,
return chanMachine.ForceClose()
},
MarkCommitmentBroadcasted: channel.MarkCommitmentBroadcasted,
MarkChannelClosed: func(summary *channeldb.ChannelCloseSummary) error {
if err := channel.CloseChannel(summary); err != nil {
MarkChannelClosed: func(summary *channeldb.ChannelCloseSummary,
statuses ...channeldb.ChannelStatus) error {
err := channel.CloseChannel(summary, statuses...)
if err != nil {
return err
}
c.cfg.NotifyClosedChannel(summary.ChanPoint)