Skip to content

Commit

Permalink
chore(all): remove unnecessary flags
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Koehler <[email protected]>
  • Loading branch information
sophia1ch committed Dec 19, 2024
1 parent 2c079f1 commit ced8fb5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/payment/app_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestApp_ValidTransition(t *testing.T) {
numParticipants := len(tt.from[0])
for i := 0; i < numParticipants; i++ {
// valid self-transition
assert.NoError(app.ValidTransition(nil, from, from, channel.Index(i))) //nolint:gosec
assert.NoError(app.ValidTransition(nil, from, from, channel.Index(i)))
}

for _, tto := range tt.tos {
Expand All @@ -105,7 +105,7 @@ func TestApp_ValidTransition(t *testing.T) {
test.WithBalances(asBalances(tto.alloc...)...),
)
for i := 0; i < numParticipants; i++ {
err := app.ValidTransition(nil, from, to, channel.Index(i)) //nolint:gosec
err := app.ValidTransition(nil, from, to, channel.Index(i))
if i == tto.valid {
assert.NoError(err)
} else {
Expand Down
4 changes: 2 additions & 2 deletions channel/persistence/statemachine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestStateMachine(t *testing.T) {
sig, err = channel.Sign(acc, csm.StagingState(), b)
require.NoError(err)
}
err = sm.AddSig(ctx, channel.Index(i), sig) //nolint:gosec
err = sm.AddSig(ctx, channel.Index(i), sig)
require.NoError(err)
tpr.AssertEqual(csm)
}
Expand Down Expand Up @@ -152,7 +152,7 @@ func TestStateMachine(t *testing.T) {

// Set Progressed
timeout := ctest.NewRandomTimeout(rng)
idx := channel.Index(rng.Intn(s.NumParts())) //nolint:gosec
idx := channel.Index(rng.Intn(s.NumParts()))
e := channel.NewProgressedEvent(s.ID[0], timeout, s, idx)
err = sm.SetProgressed(ctx, e)
require.NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion client/restore_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func mkRndChan(rng *rand.Rand, bID wallet.BackendID) *persistence.Channel {
parts[i] = map[wallet.BackendID]wallet.Address{bID: wallettest.NewRandomAccount(rng, bID).Address()}
}
ch := persistence.NewChannel()
ch.IdxV = channel.Index(rng.Intn(channel.MaxNumParts)) //nolint:gosec
ch.IdxV = channel.Index(rng.Intn(channel.MaxNumParts))
ch.ParamsV = test.NewRandomParams(rng, test.WithParts(parts))
sigs := make([]bool, channel.MaxNumParts)
opts := test.WithParams(ch.ParamsV)
Expand Down
2 changes: 1 addition & 1 deletion watcher/local/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ func randomTxsForSingleCh(rng *rand.Rand, n int) (*channel.Params, []channel.Tra
txs := make([]channel.Transaction, n)
for i := range txs {
txs[i] = channel.Transaction{State: initialState.Clone()}
txs[i].State.Version = uint64(i) //nolint:gosec
txs[i].State.Version = uint64(i)
}
return params, txs
}
Expand Down

0 comments on commit ced8fb5

Please sign in to comment.