mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
contractcourt: break launchResolvers
into two steps
In this commit, we break the old `launchResolvers` into two steps - step one is to launch the resolvers synchronously, and step two is to actually waiting for the resolvers to be resolved. This is critical as in the following commit we will require the resolvers to be launched at the same blockbeat when a force close event is sent by the chain watcher.
This commit is contained in:
@@ -146,6 +146,9 @@ func (i *htlcResolverTestContext) resolve() {
|
||||
i.resolverResultChan = make(chan resolveResult, 1)
|
||||
|
||||
go func() {
|
||||
err := i.resolver.Launch()
|
||||
require.NoError(i.t, err)
|
||||
|
||||
nextResolver, err := i.resolver.Resolve()
|
||||
i.resolverResultChan <- resolveResult{
|
||||
nextResolver: nextResolver,
|
||||
|
Reference in New Issue
Block a user