diff --git a/CHANGELOG.md b/CHANGELOG.md index e75502159..47a6e9b3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Current Master -- Fix gas estimation bug. +- Fix bug where gas estimate would sometimes be very high. +- Increased our gas estimate safety buffer to avoid Out of Gas errors. - Fix github link on info page to point at current repository. ## 2.13.6 2016-10-26 diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 1010a5789..8c811a614 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -287,7 +287,7 @@ IdentityStore.prototype.checkForDelegateCall = function (codeHex) { } } -const gasBuffer = new BN('100000', 10) +const gasBuffer = new BN('200000', 10) IdentityStore.prototype.addGasBuffer = function (gas) { const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16) const correct = bnGas.add(gasBuffer) diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js index 46b3d4809..b0940d2fa 100644 --- a/test/unit/idStore-test.js +++ b/test/unit/idStore-test.js @@ -168,9 +168,8 @@ describe('IdentityStore', function() { }) const gas = '0x04ee59' // Actual estimated gas example - const tooBigOutput = '0x80674f9' // Actual bad output const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16) - const correctBuffer = new BN('100000', 10) + const correctBuffer = new BN('200000', 10) const correct = bnGas.add(correctBuffer) const tooBig = new BN(tooBigOutput, 16)