Skip to content

Commit 187906e

Browse files
committed
Fix lint in seth
1 parent 891eec7 commit 187906e

File tree

6 files changed

+3
-9
lines changed

6 files changed

+3
-9
lines changed

seth/block_stats.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ func (cs *BlockStats) Stats(startBlock *big.Int, endBlock *big.Int) error {
7373
blockMu := &sync.Mutex{}
7474
eg := &errgroup.Group{}
7575
for bn := startBlock.Int64(); bn < endBlock.Int64(); bn++ {
76-
bn := bn
7776
eg.Go(func() error {
7877
cs.Limiter.Take()
7978
block, err := cs.Client.Client.BlockByNumber(context.Background(), big.NewInt(bn))

seth/client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,6 @@ func NewClientRaw(
370370
eg, egCtx := errgroup.WithContext(ctx)
371371
// root key is element 0 in ephemeral
372372
for _, addr := range c.Addresses[1:] {
373-
addr := addr
374373
eg.Go(func() error {
375374
return c.TransferETHFromKey(egCtx, 0, addr.Hex(), bd.AddrFunding, gasPrice)
376375
})

seth/client_api_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ func TestAPIKeys(t *testing.T) {
230230
t.Run(tc.name, func(t *testing.T) {
231231
wg := &sync.WaitGroup{}
232232
for i := 1; i < 61; i++ {
233-
i := i
234233
wg.Add(1)
235234
go func() {
236235
defer wg.Done()

seth/contract_store.go

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

5151
var allABIs []*abi.ABI
5252
for _, a := range c.ABIs {
53-
alias := a
54-
allABIs = append(allABIs, &alias)
53+
allABIs = append(allABIs, &a)
5554
}
5655

5756
return allABIs

seth/test_utils/client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ func NewClientWithAddresses(t *testing.T, addressCount int, funding *big.Int) *s
5252
eg, egCtx := errgroup.WithContext(ctx)
5353
// root key is element 0 in ephemeral
5454
for _, addr := range addresses {
55-
addr := addr
5655
eg.Go(func() error {
5756
return c.TransferETHFromKey(egCtx, 0, addr, funding, gasPrice)
5857
})

seth/tracing.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,11 @@ func (t *Tracer) checkForMissingCalls(trace Trace) []*DecodedCall {
549549

550550
for _, missingSig := range missingSignatures {
551551
byteSignature := common.Hex2Bytes(strings.TrimPrefix(missingSig, "0x"))
552-
humanName := missingSig
553552

554553
abiResult, err := t.ABIFinder.FindABIByMethod(UNKNOWN, byteSignature)
555554
if err != nil {
556555
L.Info().
557-
Str("Signature", humanName).
556+
Str("Signature", missingSig).
558557
Msg("Method not found in any ABI instance. Unable to provide any more tracing information")
559558

560559
missedCalls = append(missedCalls, unknownCall)
@@ -569,7 +568,7 @@ func (t *Tracer) checkForMissingCalls(trace Trace) []*DecodedCall {
569568

570569
missedCalls = append(missedCalls, &DecodedCall{
571570
CommonData: CommonData{
572-
Signature: humanName,
571+
Signature: missingSig,
573572
Method: abiResult.Method.Name,
574573
Input: map[string]interface{}{"warning": NO_DATA},
575574
Output: map[string]interface{}{"warning": NO_DATA},

0 commit comments

Comments
 (0)