diff --git a/cmd/loadtest/loadtest.go b/cmd/loadtest/loadtest.go index ecef3ffb..5886f17a 100644 --- a/cmd/loadtest/loadtest.go +++ b/cmd/loadtest/loadtest.go @@ -1187,6 +1187,12 @@ func loadTestRPC(ctx context.Context, c *ethclient.Client, nonce uint64, ia *Ind _, err = c.SuggestGasPrice(ctx) } else if funcNum < 21 { log.Trace().Msg("eth_estimateGas") + var tx *ethtypes.Transaction + tx, _, err = c.TransactionByHash(ctx, ethcommon.HexToHash(ia.TransactionIDs[randSrc.Intn(len(ia.TransactionIDs))])) + if err != nil { + log.Error().Err(err).Msg("Unable to get the transaction hash") + } + _, err = c.EstimateGas(ctx, txToCallMsg(tx)) } else if funcNum < 33 { log.Trace().Msg("eth_getTransactionCount") _, err = c.NonceAt(ctx, ethcommon.HexToAddress(ia.Addresses[randSrc.Intn(len(ia.Addresses))]), nil)