Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goran-ethernal committed Apr 17, 2024
1 parent 595df44 commit 088cc3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions loadtest/runner/base_load_test_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,8 @@ func (r *BaseLoadTestRunner) saveResultsToJSONFile(
// The transaction hashes are appended to the allTxnHashes slice.
// Finally, the function prints the time taken to send the transactions
// and returns the transaction hashes and nil error.
func (r *BaseLoadTestRunner) sendTransactions(createTxnFn func(*account, *feeData, *big.Int) *types.Transaction) ([]types.Hash, error) {
func (r *BaseLoadTestRunner) sendTransactions(createTxnFn func(*account, *feeData, *big.Int) *types.Transaction,
) ([]types.Hash, error) {
fmt.Println("=============================================================")

chainID, err := r.client.ChainID()
Expand Down Expand Up @@ -792,7 +793,7 @@ func (r *BaseLoadTestRunner) sendTransactionsForUserInBatches(account *account,
txHashes := make([]types.Hash, 0, r.cfg.TxsPerUser)
sendErrs := make([]error, 0)
totalTxs := 0
gas := uint64(0)
var gas uint64

Check failure on line 796 in loadtest/runner/base_load_test_runner.go

View workflow job for this annotation

GitHub Actions / Lint / Run Lint

declarations should never be cuddled (wsl)

feeData, err := getFeeData(r.client, r.cfg.DynamicTxs)
if err != nil {
Expand Down Expand Up @@ -849,7 +850,7 @@ func (r *BaseLoadTestRunner) sendTransactionsForUserInBatches(account *account,
}

txHashes = append(txHashes, hashes...)
bar.Add(len(batchTxs))
_ = bar.Add(len(batchTxs))
}

return txHashes, sendErrs, nil
Expand Down
3 changes: 2 additions & 1 deletion loadtest/runner/transaction_batch_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ func (h *TransactionBatchSender) SendBatch(params []string) ([]types.Hash, error
}

txHashes := make([]types.Hash, 0, len(responses))

for _, response := range responses {
if response.Error != nil {
return nil, fmt.Errorf("error: %v", response.Error)
return nil, fmt.Errorf("error: %w", response.Error)
}

txHashes = append(txHashes, types.StringToHash(strings.Trim(string(response.Result), "\"")))
Expand Down

0 comments on commit 088cc3f

Please sign in to comment.