fix internal call tree

pull/7/head
yann300 8 years ago
parent 6b29bbbbb5
commit dcdf20d988
  1. 7
      src/util/internalCallTree.js

@ -55,7 +55,7 @@ class InternalCallTree {
function buildTree (tree, step, scopeId, trace) {
let subScope = 1
tree.scopeStarts[step] = scopeId
tree.scopes[scopeId] = { firstStep: step }
tree.scopes[scopeId] = { firstStep: step, locals: {} }
while (step < trace.length) {
var sourceLocation
extractSourceLocation(tree, step, (error, src) => {
@ -74,10 +74,7 @@ function buildTree (tree, step, scopeId, trace) {
} else {
if (tree.includeLocalsVariables) {
var variableDeclaration = resolveVariableDeclaration(tree, step, sourceLocation)
if (variableDeclaration) {
if (!tree.scopes[scopeId].locals) {
tree.scopes[scopeId].locals = {}
}
if (variableDeclaration && !tree.scopes[scopeId].locals[variableDeclaration.attributes.name]) {
tree.traceManager.getStackAt(step, (error, stack) => {
if (!error) {
tree.solidityProxy.contractNameAt(step, (error, contractName) => { // cached

Loading…
Cancel
Save