|
|
|
@ -68,13 +68,16 @@ TxRunner.prototype.execute = function (args, callback) { |
|
|
|
|
if (!executionContext.isVM()) { |
|
|
|
|
self.runInNode(args.from, args.to, data, args.value, args.gasLimit, args.useCall, callback) |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
|
self.runInVm(args.from, args.to, data, args.value, args.gasLimit, args.useCall, callback) |
|
|
|
|
} catch (e) { |
|
|
|
|
callback(e, null) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall, callback) { |
|
|
|
|
const self = this |
|
|
|
|
try { |
|
|
|
|
var account = self.vmaccounts[from] |
|
|
|
|
if (!account) { |
|
|
|
|
return callback('Invalid account selected') |
|
|
|
@ -119,9 +122,6 @@ TxRunner.prototype.runInVm = function (from, to, data, value, gasLimit, useCall, |
|
|
|
|
transactionHash: ethJSUtil.bufferToHex(new Buffer(tx.hash())) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} catch (e) { |
|
|
|
|
callback(e, null) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TxRunner.prototype.runInNode = function (from, to, data, value, gasLimit, useCall, callback) { |
|
|
|
|