Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
df0dcbd9
Commit
df0dcbd9
authored
Jan 05, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pushCall
parent
bdad659a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
traceAnalyser.js
src/trace/traceAnalyser.js
+2
-2
traceCache.js
src/trace/traceCache.js
+6
-5
No files found.
src/trace/traceAnalyser.js
View file @
df0dcbd9
...
@@ -112,9 +112,9 @@ TraceAnalyser.prototype.buildDepth = function (index, step, tx, callStack, conte
...
@@ -112,9 +112,9 @@ TraceAnalyser.prototype.buildDepth = function (index, step, tx, callStack, conte
context
.
lastCallIndex
=
context
.
currentCallIndex
context
.
lastCallIndex
=
context
.
currentCallIndex
context
.
currentCallIndex
=
0
context
.
currentCallIndex
=
0
}
else
if
(
traceHelper
.
isReturnInstruction
(
step
)
||
traceHelper
.
isStopInstruction
(
step
)
||
outOfGas
||
step
.
error
||
step
.
invalidDepthChange
)
{
}
else
if
(
traceHelper
.
isReturnInstruction
(
step
)
||
traceHelper
.
isStopInstruction
(
step
)
||
outOfGas
||
step
.
error
||
step
.
invalidDepthChange
)
{
if
(
index
+
1
<
this
.
trace
.
length
)
{
if
(
index
<
this
.
trace
.
length
)
{
callStack
.
pop
()
callStack
.
pop
()
this
.
traceCache
.
pushCall
(
step
,
index
+
1
,
null
,
callStack
.
slice
(
0
),
outOfGas
)
this
.
traceCache
.
pushCall
(
step
,
index
+
1
,
null
,
callStack
.
slice
(
0
),
outOfGas
||
step
.
error
||
step
.
invalidDepthChange
,
outOfGas
)
this
.
buildCalldata
(
index
,
step
,
tx
,
false
)
this
.
buildCalldata
(
index
,
step
,
tx
,
false
)
this
.
traceCache
.
pushSteps
(
index
,
context
.
currentCallIndex
)
this
.
traceCache
.
pushSteps
(
index
,
context
.
currentCallIndex
)
context
.
currentCallIndex
=
context
.
lastCallIndex
+
1
context
.
currentCallIndex
=
context
.
lastCallIndex
+
1
...
...
src/trace/traceCache.js
View file @
df0dcbd9
...
@@ -33,17 +33,18 @@ TraceCache.prototype.pushMemoryChanges = function (value) {
...
@@ -33,17 +33,18 @@ TraceCache.prototype.pushMemoryChanges = function (value) {
this
.
memoryChanges
.
push
(
value
)
this
.
memoryChanges
.
push
(
value
)
}
}
TraceCache
.
prototype
.
pushCall
=
function
(
step
,
index
,
address
,
callStack
,
outofGas
)
{
TraceCache
.
prototype
.
pushCall
=
function
(
step
,
index
,
address
,
callStack
,
reverted
,
outOfGas
)
{
if
(
step
.
op
===
'RETURN'
||
step
.
op
===
'STOP'
||
outofGas
)
{
if
(
step
.
op
===
'RETURN'
||
step
.
op
===
'STOP'
||
reverted
)
{
this
.
currentCall
.
call
.
return
=
index
this
.
currentCall
.
call
.
return
=
index
-
1
this
.
currentCall
.
call
.
reverted
=
reverted
this
.
currentCall
.
call
.
outOfGas
=
outOfGas
var
parent
=
this
.
currentCall
.
parent
var
parent
=
this
.
currentCall
.
parent
this
.
currentCall
=
{
call
:
parent
.
call
,
parent
:
parent
.
parent
}
this
.
currentCall
=
parent
?
{
call
:
parent
.
call
,
parent
:
parent
.
parent
}
:
null
}
else
{
}
else
{
var
call
=
{
var
call
=
{
op
:
step
.
op
,
op
:
step
.
op
,
address
:
address
,
address
:
address
,
callStack
:
callStack
,
callStack
:
callStack
,
outofGas
:
outofGas
,
calls
:
{},
calls
:
{},
start
:
index
start
:
index
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment