Commit 593e47f1 authored by chriseth's avatar chriseth Committed by GitHub

Merge pull request #304 from ethereum/vm-usecall

Support useCall in VM mode
parents f96ff72a db2a80c3
......@@ -829,9 +829,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
......
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