From 6f39924e60545ca8ac19995a799c16d0dea11b04 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 8 Nov 2016 08:32:34 -0800 Subject: Increase gas buffer Fixes #795 --- app/scripts/lib/idStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/scripts') 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) -- cgit v1.2.3 From 7068d2e71c6d1ddb68095916dc16f3ff1f283590 Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Tue, 8 Nov 2016 08:39:41 -0800 Subject: Adjust gas buffer to be 20% over estimate --- app/scripts/lib/idStore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index 8c811a614..0ce91f471 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -287,9 +287,10 @@ IdentityStore.prototype.checkForDelegateCall = function (codeHex) { } } -const gasBuffer = new BN('200000', 10) IdentityStore.prototype.addGasBuffer = function (gas) { const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16) + const five = new BN('5', 10) + const gasBuffer = bnGas.div(five) const correct = bnGas.add(gasBuffer) return ethUtil.addHexPrefix(correct.toString(16)) } -- cgit v1.2.3