Skip to content

Commit 08c04e3

Browse files
committed
Fix
1 parent 3bc6ccb commit 08c04e3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

seth/client_api_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ func TestAPIKeys(t *testing.T) {
231231
wg := &sync.WaitGroup{}
232232
for i := 1; i < 61; i++ {
233233
wg.Add(1)
234-
go func() {
234+
go func(i int) {
235235
defer wg.Done()
236236
_, err := c.Decode(
237237
TestEnv.DebugContract.AddCounter(c.NewTXKeyOpts(i), big.NewInt(0), big.NewInt(1)),
238238
)
239239
require.NoError(t, err)
240-
}()
240+
}(i)
241241
}
242242
wg.Wait()
243243
for i := 1; i < 61; i++ {

seth/contract_store.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ func (c *ContractStore) GetAllABIs() []*abi.ABI {
5050

5151
var allABIs []*abi.ABI
5252
for _, a := range c.ABIs {
53-
allABIs = append(allABIs, &a)
53+
aCopy := a //nolint
54+
allABIs = append(allABIs, &aCopy)
5455
}
5556

5657
return allABIs

seth/keyfile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func ReturnFunds(c *Client, toAddr string) error {
5555
}
5656

5757
for i := 1; i < len(c.Addresses); i++ {
58-
idx := i
58+
idx := i //nolint
5959
eg.Go(func() error {
6060
ctx, balanceCancel := context.WithTimeout(egCtx, c.Cfg.Network.TxnTimeout.Duration())
6161
balance, err := c.Client.BalanceAt(ctx, c.Addresses[idx], nil)

0 commit comments

Comments
 (0)