Merge pull request #169 from ethereum/manageinvalidJump

Various fixes
pull/7/head
chriseth 8 years ago committed by GitHub
commit 7074e733b6
  1. 7
      src/trace/traceStepManager.js
  2. 2
      src/ui/ButtonNavigator.js
  3. 2
      src/ui/TxBrowser.js
  4. 2
      src/web3Provider/web3VmProvider.js

@ -38,7 +38,12 @@ TraceStepManager.prototype.findNextCall = function (currentStep) {
var call = util.findCall(currentStep, this.traceAnalyser.traceCache.callsTree.call)
var subCalls = Object.keys(call.calls)
if (subCalls.length) {
return call.calls[subCalls[0]].start - 1
var callStart = util.findLowerBound(currentStep, subCalls) + 1
if (subCalls.length > callStart) {
return subCalls[callStart] - 1
} else {
return currentStep
}
} else {
return currentStep
}

@ -34,7 +34,7 @@ function ButtonNavigator (_parent, _traceManager) {
this.view.querySelector('#reverted #parenthasthrown').style.display = 'none'
} else {
var k = callsPath.length - 2
while (k > 0) {
while (k >= 0) {
var parent = callsPath[k]
if (parent.reverted) {
this.revertionPoint = parent.return

@ -33,8 +33,6 @@ function TxBrowser (_parent) {
// invokation: 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51
TxBrowser.prototype.setDefaultValues = function () {
this.blockNumber = ''
this.txNumber = ''
this.connectInfo = ''
this.basicPanel.data = {}
this.basicPanel.update()

@ -79,6 +79,8 @@ 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'
self.vmTraces[self.processingHash].gas = '0x' + data.gasUsed.toString(16)
if (data.createdAddress) {
self.vmTraces[self.processingHash].return = util.hexConvert(data.createdAddress)

Loading…
Cancel
Save