diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-11-09 00:32:34 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-11-09 00:32:34 +0800 |
commit | 6f39924e60545ca8ac19995a799c16d0dea11b04 (patch) | |
tree | 25f604d033abae66bee259d0e5e12996b19256bc | |
parent | 62a15fc59e4e79a162867ae95e619d1ad22911ec (diff) | |
download | tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar.gz tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar.bz2 tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar.lz tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar.xz tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.tar.zst tangerine-wallet-browser-6f39924e60545ca8ac19995a799c16d0dea11b04.zip |
Increase gas buffer
Fixes #795
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | app/scripts/lib/idStore.js | 2 | ||||
-rw-r--r-- | test/unit/idStore-test.js | 3 |
3 files changed, 4 insertions, 4 deletions
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) |