Skip to content

Commit

Permalink
Support useCall in VM mode
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Nov 8, 2016
1 parent 1530f69 commit db2a80c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/universal-dapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db2a80c

Please sign in to comment.