Skip to content

Commit 76df55b

Browse files
committed
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
1 parent f4e7e67 commit 76df55b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

loopin_test.go

Lines changed: 5 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,6 @@ func startNewLoopIn(t *testing.T, ctx *loopInTestContext, height int32) (
783783
}
784784
ctx.errChan <- err
785785
}()
786-
return cfg, err, inSwap
786+
787+
return cfg, inSwap, err
787788
}

0 commit comments

Comments
 (0)