Commit 30463c9a authored by Iuri Matias's avatar Iuri Matias Committed by yann300

check result instead of previous early return fix

parent 6eddacbe
...@@ -112,14 +112,13 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall, ...@@ -112,14 +112,13 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall,
} }
executionContext.vm().runTx({block: block, tx: tx, skipBalance: true, skipNonce: true}, function (err, result) { executionContext.vm().runTx({block: block, tx: tx, skipBalance: true, skipNonce: true}, function (err, result) {
if (err) {
return callback(err)
}
if (useCall) { if (useCall) {
executionContext.vm().stateManager.revert(function () {}) executionContext.vm().stateManager.revert(function () {})
} }
err = err ? err.message : err err = err ? err.message : err
result.status = '0x' + result.vm.exception.toString(16) if (result) {
result.status = '0x' + result.vm.exception.toString(16)
}
callback(err, { callback(err, {
result: result, result: result,
transactionHash: ethJSUtil.bufferToHex(new Buffer(tx.hash())) transactionHash: ethJSUtil.bufferToHex(new Buffer(tx.hash()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment