multi: use context in loopdb call

This commit adds a context to our loopdb interface, which we should use
in the sqlite migration.
This commit is contained in:
sputn1ck 2023-05-16 17:40:52 +02:00
parent 319a519309
commit becc8a38d8
No known key found for this signature in database
GPG key ID: 671103D881A5F0E4
15 changed files with 161 additions and 120 deletions

View file

@ -395,6 +395,7 @@ func testLoopInResume(t *testing.T, state loopdb.SwapState, expired bool,
storedVersion loopdb.ProtocolVersion) {
defer test.Guard(t)()
ctxb := context.Background()
ctx := newLoopInTestContext(t)
cfg := newSwapConfig(&ctx.lnd.LndServices, ctx.store, ctx.server)
@ -454,7 +455,7 @@ func testLoopInResume(t *testing.T, state loopdb.SwapState, expired bool,
)
require.NoError(t, err)
err = ctx.store.CreateLoopIn(testPreimage.Hash(), contract)
err = ctx.store.CreateLoopIn(ctxb, testPreimage.Hash(), contract)
require.NoError(t, err)
inSwap, err := resumeLoopInSwap(context.Background(), cfg, pendSwap)