Support useCall in VM mode

pull/1/head
Alex Beregszaszi 8 years ago
parent 1530f69ade
commit db2a80c31f
  1. 6
      src/universal-dapp.js

@ -828,9 +828,15 @@ UniversalDApp.prototype.rawRunTx = function (args, cb) {
})
if (!args.useCall) {
++self.blockNumber
} else {
self.vm.stateManager.checkpoint()
}
self.vm.runTx({block: block, tx: tx, skipBalance: true, skipNonce: true}, function (err, result) {
var transactionHash = self.txdebugger.web3().releaseCurrentHash() // used to keep track of the transaction
if (args.useCall) {
self.vm.stateManager.revert()
}
cb(err, {
result: result,
transactionHash: transactionHash

Loading…
Cancel
Save