Merge pull request #642 from ethereum/fixLastOpIsUndefined

Check if vm trace opcodes are populated
pull/7/head
yann300 7 years ago committed by GitHub
commit ac571688d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      remix-lib/src/web3Provider/web3VmProvider.js

@ -97,7 +97,9 @@ web3VmProvider.prototype.txWillProcess = function (self, data) {
web3VmProvider.prototype.txProcessed = function (self, data) {
var lastOp = self.vmTraces[self.processingHash].structLogs[self.processingIndex - 1]
lastOp.error = lastOp.op !== 'RETURN' && lastOp.op !== 'STOP'
if (lastOp) {
lastOp.error = lastOp.op !== 'RETURN' && lastOp.op !== 'STOP' && lastOp.op !== 'SELFDESTRUCT'
}
self.vmTraces[self.processingHash].gas = '0x' + data.gasUsed.toString(16)
var logs = []

Loading…
Cancel
Save