diff --git a/loadtest/runner/base_load_test_runner.go b/loadtest/runner/base_load_test_runner.go index 26a77f172f..6830b0b2f5 100644 --- a/loadtest/runner/base_load_test_runner.go +++ b/loadtest/runner/base_load_test_runner.go @@ -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() @@ -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 feeData, err := getFeeData(r.client, r.cfg.DynamicTxs) if err != nil { @@ -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 diff --git a/loadtest/runner/transaction_batch_sender.go b/loadtest/runner/transaction_batch_sender.go index 1d99f1d3de..84dcb83361 100644 --- a/loadtest/runner/transaction_batch_sender.go +++ b/loadtest/runner/transaction_batch_sender.go @@ -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), "\"")))