multi: create init result structs

This commit is contained in:
Joost Jager 2020-06-30 14:06:36 +02:00
parent 68012f051a
commit 8b215edaa2
No known key found for this signature in database
GPG key ID: A61B9D4C393C59C7
5 changed files with 35 additions and 12 deletions

View file

@ -35,13 +35,14 @@ func TestLoopInSuccess(t *testing.T) {
cfg := newSwapConfig(&ctx.lnd.LndServices, ctx.store, ctx.server)
swap, err := newLoopInSwap(
initResult, err := newLoopInSwap(
context.Background(), cfg,
height, &testLoopInRequest,
)
if err != nil {
t.Fatal(err)
}
swap := initResult.swap
ctx.store.assertLoopInStored()
@ -159,13 +160,14 @@ func testLoopInTimeout(t *testing.T,
req.ExternalHtlc = true
}
s, err := newLoopInSwap(
initResult, err := newLoopInSwap(
context.Background(), cfg,
height, &req,
)
if err != nil {
t.Fatal(err)
}
s := initResult.swap
ctx.store.assertLoopInStored()