Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ae71da1b
Commit
ae71da1b
authored
Jan 04, 2018
by
Péter Szilágyi
Committed by
Felix Lange
Jan 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth: fix tracer panic when running without configs + reexec (#15799)
parent
7a59a938
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
api_tracer.go
eth/api_tracer.go
+3
-3
No files found.
eth/api_tracer.go
View file @
ae71da1b
...
@@ -204,7 +204,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
...
@@ -204,7 +204,7 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl
if
err
!=
nil
{
if
err
!=
nil
{
// If the starting state is missing, allow some number of blocks to be reexecuted
// If the starting state is missing, allow some number of blocks to be reexecuted
reexec
:=
defaultTraceReexec
reexec
:=
defaultTraceReexec
if
config
.
Reexec
!=
nil
{
if
config
!=
nil
&&
config
.
Reexec
!=
nil
{
reexec
=
*
config
.
Reexec
reexec
=
*
config
.
Reexec
}
}
// Find the most recent block that has the state available
// Find the most recent block that has the state available
...
@@ -465,7 +465,7 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
...
@@ -465,7 +465,7 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block,
return
nil
,
fmt
.
Errorf
(
"parent %x not found"
,
block
.
ParentHash
())
return
nil
,
fmt
.
Errorf
(
"parent %x not found"
,
block
.
ParentHash
())
}
}
reexec
:=
defaultTraceReexec
reexec
:=
defaultTraceReexec
if
config
.
Reexec
!=
nil
{
if
config
!=
nil
&&
config
.
Reexec
!=
nil
{
reexec
=
*
config
.
Reexec
reexec
=
*
config
.
Reexec
}
}
statedb
,
err
:=
api
.
computeStateDB
(
parent
,
reexec
)
statedb
,
err
:=
api
.
computeStateDB
(
parent
,
reexec
)
...
@@ -619,7 +619,7 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Ha
...
@@ -619,7 +619,7 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Ha
return
nil
,
fmt
.
Errorf
(
"transaction %x not found"
,
hash
)
return
nil
,
fmt
.
Errorf
(
"transaction %x not found"
,
hash
)
}
}
reexec
:=
defaultTraceReexec
reexec
:=
defaultTraceReexec
if
config
.
Reexec
!=
nil
{
if
config
!=
nil
&&
config
.
Reexec
!=
nil
{
reexec
=
*
config
.
Reexec
reexec
=
*
config
.
Reexec
}
}
msg
,
vmctx
,
statedb
,
err
:=
api
.
computeTxEnv
(
blockHash
,
int
(
index
),
reexec
)
msg
,
vmctx
,
statedb
,
err
:=
api
.
computeTxEnv
(
blockHash
,
int
(
index
),
reexec
)
...
...
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