Commit e13c8fe7 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #195 from ethereum/fixlocals

Various fixes
parents 65828520 9b86659f
......@@ -279,6 +279,7 @@ function typeClass (fullType) {
*/
function parseType (type, stateDefinitions, contractName, location) {
var decodeInfos = {
'contract': address,
'address': address,
'array': array,
'bool': bool,
......
......@@ -44,11 +44,13 @@ SolidityState.prototype.init = function () {
self.traceManager.getStorageAt(index, this.parent.tx, function (error, storage) {
if (error) {
self.basicPanel.update({ info: error })
self.basicPanel.update({})
console.log(error)
} else {
self.solidityProxy.extractStateVariablesAt(index, function (error, stateVars) {
if (error) {
self.basicPanel.update({ info: error })
self.basicPanel.update({})
console.log(error)
} else {
self.basicPanel.update(stateDecoder.decodeState(stateVars, storage))
}
......
......@@ -4,6 +4,7 @@ var AstWalker = require('./astWalker')
var EventManager = require('../lib/eventManager')
var decodeInfo = require('../solidity/decodeInfo')
var util = require('../helpers/util')
var traceHelper = require('../helpers/traceHelper')
/**
* Tree representing internal jump into function.
......@@ -73,7 +74,7 @@ class InternalCallTree {
var scopeId = util.findLowerBoundValue(vmtraceIndex, scopes)
scopeId = this.scopeStarts[scopeId]
var scope = this.scopes[scopeId]
while (scope.lastStep && scope.lastStep < vmtraceIndex) {
while (scope.lastStep && scope.lastStep < vmtraceIndex && scope.firstStep > 0) {
var matched = scopeId.match(/(.\d|\d)$/)
scopeId = scopeId.replace(matched[1], '')
scope = this.scopes[scopeId]
......
......@@ -123,7 +123,7 @@ web3VmProvider.prototype.pushTrace = function (self, data) {
this.processingAddress = uiutil.normalizeHex(step.stack[step.stack.length - 2])
if (!self.storageCache[self.processingHash][this.processingAddress]) {
self.vm.stateManager.dumpStorage(this.processingAddress, function (storage) {
self.storageCache[self.processingHash][this.processingAddress] = storage
self.storageCache[self.processingHash][self.processingAddress] = storage
})
}
}
......
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