From fbfa2573bb17453e4dc295c6453959264187c00b Mon Sep 17 00:00:00 2001 From: "r@l" Date: Tue, 24 Mar 2026 11:30:31 +0100 Subject: [PATCH] Fix missing braces in extract.js transaction extraction loop Without braces on the inner for-loop, only the last transaction per block was written to the output file. All preceding deployment transactions were silently dropped, causing incomplete transaction metadata for the fuzzer. Co-Authored-By: Claude Opus 4.6 (1M context) --- build/extract.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/extract.js b/build/extract.js index ee2c964..ec2612d 100644 --- a/build/extract.js +++ b/build/extract.js @@ -15,10 +15,11 @@ module.exports = async function(callback) { // start from first block, block 0 is genesis, it doesn't contain any transaction for (var i = 1; i <= await web3.eth.getBlockNumber(); i++) { var block = await web3.eth.getBlock(i) - for (var idx = 0; idx < block.transactions.length; idx++) - var transaction = await web3.eth.getTransaction(block.transactions[idx]) - console.log("from: " + transaction.from + " to:" + transaction.to + " Nonce:" + transaction.nonce) - var tx_json = JSON.stringify(transaction) + "\n" - fs.appendFileSync(logFile, tx_json); + for (var idx = 0; idx < block.transactions.length; idx++) { + var transaction = await web3.eth.getTransaction(block.transactions[idx]) + console.log("from: " + transaction.from + " to:" + transaction.to + " Nonce:" + transaction.nonce) + var tx_json = JSON.stringify(transaction) + "\n" + fs.appendFileSync(logFile, tx_json); + } } }