1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 09:23:21 +01:00

Increase gas buffer

Fixes #795
This commit is contained in:
Dan Finlay 2016-11-08 08:32:34 -08:00
parent 62a15fc59e
commit 6f39924e60
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)