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
a0fd4b7e
Commit
a0fd4b7e
authored
Feb 04, 2019
by
Martin Holst Swende
Committed by
Felix Lange
Feb 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/vm: unshadow err to make it visible in tracers(#18504)
parent
822dc1bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
interpreter.go
core/vm/interpreter.go
+4
-3
No files found.
core/vm/interpreter.go
View file @
a0fd4b7e
...
...
@@ -182,6 +182,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
pcCopy
uint64
// needed for the deferred Tracer
gasCopy
uint64
// for Tracer to log gas remaining before execution
logged
bool
// deferred Tracer should ignore already logged steps
res
[]
byte
// result of the opcode execution function
)
contract
.
Input
=
input
...
...
@@ -216,11 +217,11 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
if
!
operation
.
valid
{
return
nil
,
fmt
.
Errorf
(
"invalid opcode 0x%x"
,
int
(
op
))
}
if
err
:
=
operation
.
validateStack
(
stack
);
err
!=
nil
{
if
err
=
operation
.
validateStack
(
stack
);
err
!=
nil
{
return
nil
,
err
}
// If the operation is valid, enforce and write restrictions
if
err
:
=
in
.
enforceRestrictions
(
op
,
operation
,
stack
);
err
!=
nil
{
if
err
=
in
.
enforceRestrictions
(
op
,
operation
,
stack
);
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -254,7 +255,7 @@ func (in *EVMInterpreter) Run(contract *Contract, input []byte, readOnly bool) (
}
// execute the operation
res
,
err
:
=
operation
.
execute
(
&
pc
,
in
,
contract
,
mem
,
stack
)
res
,
err
=
operation
.
execute
(
&
pc
,
in
,
contract
,
mem
,
stack
)
// verifyPool is a build flag. Pool verification makes sure the integrity
// of the integer pool by comparing values to a default value.
if
verifyPool
{
...
...
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