Add explanation for the gas limit truncation

pull/1/head
Alex Beregszaszi 8 years ago
parent 5c98506f01
commit 2a703772de
  1. 2
      src/app/txRunner.js

@ -73,6 +73,8 @@ TxRunner.prototype.execute = function () {
if (err) { if (err) {
return callback(err) return callback(err)
} else { } 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) var blockGasLimit = Math.floor(block.gasLimit - block.gasLimit / 1024)
tx.gas = blockGasLimit < gasEstimation ? blockGasLimit : gasEstimation tx.gas = blockGasLimit < gasEstimation ? blockGasLimit : gasEstimation

Loading…
Cancel
Save