Open iningwei opened 11 months ago
async function sendTransactions() { const currentNonce = await getCurrentNonce(wallet); const gasPrice = await getGasPrice();
for (let i = 0; i < config.repeatCount; i++) { await sendTransaction(currentNonce + i, gasPrice); } }
await sendTransaction(currentNonce + i, gasPrice); 这句,这个gasPrice参数是不是没有必要?
可以优化,直接在 sendTransaction 计算gas
async function sendTransactions() { const currentNonce = await getCurrentNonce(wallet); const gasPrice = await getGasPrice();
for (let i = 0; i < config.repeatCount; i++) { await sendTransaction(currentNonce + i, gasPrice);
} }
await sendTransaction(currentNonce + i, gasPrice); 这句,这个gasPrice参数是不是没有必要?