multi: reliable hand-off from htlcswitch to contractcourt
This is achieved by changing the 1-way handoff to a 2-way handoff with a done channel.
This commit is contained in:
7 files changed
+193
-75
No files matched your search
@@ -815,6 +815,10 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
||||
return p.cfg.ChainArb.UpdateContractSignals(*chanPoint, signals)
|
||||
}
|
||||
|
||||
notifyContractUpdate := func(update *contractcourt.ContractUpdate) error {
|
||||
return p.cfg.ChainArb.NotifyContractUpdate(*chanPoint, update)
|
||||
}
|
||||
|
||||
chanType := lnChan.State().ChanType
|
||||
|
||||
// Select the appropriate tower client based on the channel type. It's
|
||||
@@ -842,6 +846,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
||||
PreimageCache: p.cfg.WitnessBeacon,
|
||||
ChainEvents: chainEvents,
|
||||
UpdateContractSignals: updateContractSignals,
|
||||
NotifyContractUpdate: notifyContractUpdate,
|
||||
OnChannelFailure: onChannelFailure,
|
||||
SyncStates: syncStates,
|
||||
BatchTicker: ticker.New(p.cfg.ChannelCommitInterval),
|
||||
|
||||
Reference in new issue
Block a user