multi: make MarkCommitmentBroadcasted take closeTx

This commit is contained in:
Johan T. Halseth
2019-09-06 13:14:39 +02:00
parent a810092e53
commit 02b2787e44
6 changed files with 29 additions and 10 deletions

View File

@@ -97,7 +97,7 @@ type ChannelArbitratorConfig struct {
// MarkCommitmentBroadcasted should mark the channel as the commitment
// being broadcast, and we are waiting for the commitment to confirm.
MarkCommitmentBroadcasted func() error
MarkCommitmentBroadcasted func(*wire.MsgTx) error
// MarkChannelClosed marks the channel closed in the database, with the
// passed close summary. After this method successfully returns we can
@@ -840,7 +840,7 @@ func (c *ChannelArbitrator) stateStep(
}
}
if err := c.cfg.MarkCommitmentBroadcasted(); err != nil {
if err := c.cfg.MarkCommitmentBroadcasted(closeTx); err != nil {
log.Errorf("ChannelArbitrator(%v): unable to "+
"mark commitment broadcasted: %v",
c.cfg.ChanPoint, err)

View File

@@ -213,7 +213,7 @@ func createTestChannelArbitrator(log ArbitratorLog) (*ChannelArbitrator,
}
return summary, nil
},
MarkCommitmentBroadcasted: func() error {
MarkCommitmentBroadcasted: func(_ *wire.MsgTx) error {
return nil
},
MarkChannelClosed: func(*channeldb.ChannelCloseSummary) error {