From 76df55b2405a236bc588b8b131ceb4263185a823 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 11 Dec 2025 15:38:25 +0100 Subject: [PATCH] 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 --- loopin_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/loopin_test.go b/loopin_test.go index d413cc83..b26ff42f 100644 --- a/loopin_test.go +++ b/loopin_test.go @@ -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 }