From 2a703772de20ed05aa7dd15277b8101ea148bc16 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 6 Jan 2017 12:36:48 +0000 Subject: [PATCH] Add explanation for the gas limit truncation --- src/app/txRunner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/txRunner.js b/src/app/txRunner.js index f8a76b437e..270cde2076 100644 --- a/src/app/txRunner.js +++ b/src/app/txRunner.js @@ -73,6 +73,8 @@ TxRunner.prototype.execute = function () { if (err) { return callback(err) } else { + // NOTE: estimateGas very likely will return a large limit if execution of the code failed + // we want to be able to run the code in order to debug and find the cause for the failure var blockGasLimit = Math.floor(block.gasLimit - block.gasLimit / 1024) tx.gas = blockGasLimit < gasEstimation ? blockGasLimit : gasEstimation