loop: fix error return order in loopin_test.go

- Change return signature of startNewLoopIn from (*swapConfig, error, *loopInSwap) to (*swapConfig, *loopInSwap, error)
- Fixes ST1008: error should be returned as the last argument
This commit is contained in:
Slyghtning 2025-12-11 15:38:25 +01:00
parent f4e7e676d4
commit 76df55b240
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF

View file

@ -593,7 +593,7 @@ func TestAbandonPublishedHtlcState(t *testing.T) {
height := int32(600)
cfg, err, inSwap := startNewLoopIn(t, ctx, height)
cfg, inSwap, err := startNewLoopIn(t, ctx, height)
require.NoError(t, err)
advanceToPublishedHtlc(t, ctx)
@ -663,7 +663,7 @@ func TestAbandonSettledInvoiceState(t *testing.T) {
height := int32(600)
cfg, err, inSwap := startNewLoopIn(t, ctx, height)
cfg, inSwap, err := startNewLoopIn(t, ctx, height)
require.NoError(t, err)
advanceToPublishedHtlc(t, ctx)
@ -760,7 +760,7 @@ func advanceToPublishedHtlc(t *testing.T, ctx *loopInTestContext) SwapInfo {
}
func startNewLoopIn(t *testing.T, ctx *loopInTestContext, height int32) (
*swapConfig, error, *loopInSwap) {
*swapConfig, *loopInSwap, error) {
cfg := newSwapConfig(&ctx.lnd.LndServices, ctx.store, ctx.server, nil)
@ -783,5 +783,6 @@ func startNewLoopIn(t *testing.T, ctx *loopInTestContext, height int32) (
}
ctx.errChan <- err
}()
return cfg, err, inSwap
return cfg, inSwap, err
}