contractcourt/[channel|chain]_arbitrator: define MarkChannelClosed
This commit is contained in:
parent
740db4716f
commit
3549f2bc17
@ -243,6 +243,7 @@ func newActiveChannelArbitrator(channel *channeldb.OpenChannel,
|
|||||||
return chanMachine.ForceClose()
|
return chanMachine.ForceClose()
|
||||||
},
|
},
|
||||||
MarkCommitmentBroadcasted: channel.MarkCommitmentBroadcasted,
|
MarkCommitmentBroadcasted: channel.MarkCommitmentBroadcasted,
|
||||||
|
MarkChannelClosed: channel.CloseChannel,
|
||||||
ChainArbitratorConfig: c.cfg,
|
ChainArbitratorConfig: c.cfg,
|
||||||
ChainEvents: chanEvents,
|
ChainEvents: chanEvents,
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,13 @@ type ChannelArbitratorConfig struct {
|
|||||||
// being broadcast, and we are waiting for the commitment to confirm.
|
// being broadcast, and we are waiting for the commitment to confirm.
|
||||||
MarkCommitmentBroadcasted func() error
|
MarkCommitmentBroadcasted func() error
|
||||||
|
|
||||||
|
// MarkChannelClosed marks the channel closed in the database, with the
|
||||||
|
// passed close summary. After this method successfully returns we can
|
||||||
|
// no longer expect to receive chain events for this channel, and must
|
||||||
|
// be able to recover from a failure without getting the close event
|
||||||
|
// again.
|
||||||
|
MarkChannelClosed func(*channeldb.ChannelCloseSummary) error
|
||||||
|
|
||||||
// MarkChannelResolved is a function closure that serves to mark a
|
// MarkChannelResolved is a function closure that serves to mark a
|
||||||
// channel as "fully resolved". A channel itself can be considered
|
// channel as "fully resolved". A channel itself can be considered
|
||||||
// fully resolved once all active contracts have individually been
|
// fully resolved once all active contracts have individually been
|
||||||
|
@ -137,7 +137,9 @@ func createTestChannelArbitrator(log ArbitratorLog) (*ChannelArbitrator,
|
|||||||
MarkCommitmentBroadcasted: func() error {
|
MarkCommitmentBroadcasted: func() error {
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
MarkChannelClosed: func(*channeldb.ChannelCloseSummary) error {
|
||||||
|
return nil
|
||||||
|
},
|
||||||
ChainArbitratorConfig: chainArbCfg,
|
ChainArbitratorConfig: chainArbCfg,
|
||||||
ChainEvents: chanEvents,
|
ChainEvents: chanEvents,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user