From 21e2e4efd803c8c904cecf039ee73fead0e6c4c1 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 10 Jan 2017 14:20:46 -0800 Subject: [PATCH 1/2] Remove erroneous OOG estimation logic. --- app/scripts/lib/tx-utils.js | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index a976173f5..d1fb98f42 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -20,7 +20,6 @@ module.exports = class txProviderUtils { if (err) return cb(err) async.waterfall([ self.estimateTxGas.bind(self, txData, block.gasLimit), - self.checkForTxGasError.bind(self, txData), self.setTxGas.bind(self, txData, block.gasLimit), ], cb) }) @@ -38,22 +37,10 @@ module.exports = class txProviderUtils { this.query.estimateGas(txParams, cb) } - checkForTxGasError (txData, estimatedGasHex, cb) { + setTxGas (txData, blockGasLimitHex, estimatedGasHex, cb) { txData.estimatedGas = estimatedGasHex - // all gas used - must be an error - if (estimatedGasHex === txData.txParams.gas) { - txData.simulationFails = true - } - cb() - } - - setTxGas (txData, blockGasLimitHex, cb) { const txParams = txData.txParams - // if OOG, nothing more to do - if (txData.simulationFails) { - cb() - return - } + // if gasLimit was specified and doesnt OOG, // use original specified amount if (txData.gasLimitSpecified) { From 55a55754d02672982bb57c496b5773e8ea1b8869 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 10 Jan 2017 14:20:51 -0800 Subject: [PATCH 2/2] Bump changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 420296bbd..9cd13e102 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Remove certain non-essential permissions from certain builds. - Add a check for when a tx is included in a block. +- Fix bug where browser-solidity would sometimes warn of a contract creation error when there was none. - Minor modifications to network display. - Network now displays properly for pending transactions. - Implement replay attack protections allowed by EIP 155.