Skip to content

Commit 82f68f7

Browse files
committed
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
1 parent 602c3ea commit 82f68f7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

loopin_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ func TestAbandonPublishedHtlcState(t *testing.T) {
593593

594594
height := int32(600)
595595

596-
cfg, err, inSwap := startNewLoopIn(t, ctx, height)
596+
cfg, inSwap, err := startNewLoopIn(t, ctx, height)
597597
require.NoError(t, err)
598598

599599
advanceToPublishedHtlc(t, ctx)
@@ -663,7 +663,7 @@ func TestAbandonSettledInvoiceState(t *testing.T) {
663663

664664
height := int32(600)
665665

666-
cfg, err, inSwap := startNewLoopIn(t, ctx, height)
666+
cfg, inSwap, err := startNewLoopIn(t, ctx, height)
667667
require.NoError(t, err)
668668

669669
advanceToPublishedHtlc(t, ctx)
@@ -760,7 +760,7 @@ func advanceToPublishedHtlc(t *testing.T, ctx *loopInTestContext) SwapInfo {
760760
}
761761

762762
func startNewLoopIn(t *testing.T, ctx *loopInTestContext, height int32) (
763-
*swapConfig, error, *loopInSwap) {
763+
*swapConfig, *loopInSwap, error) {
764764

765765
cfg := newSwapConfig(&ctx.lnd.LndServices, ctx.store, ctx.server, nil)
766766

@@ -783,5 +783,5 @@ func startNewLoopIn(t *testing.T, ctx *loopInTestContext, height int32) (
783783
}
784784
ctx.errChan <- err
785785
}()
786-
return cfg, err, inSwap
786+
return cfg, inSwap, err
787787
}

0 commit comments

Comments
 (0)