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
43cd31ea
Unverified
Commit
43cd31ea
authored
4 years ago
by
Guillaume Ballet
Committed by
GitHub
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/vm: dedup config check in markdown logger (#21655)
* core/vm: dedup config check * review feedback: reuse buffer
parent
5e86e4ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
logger.go
core/vm/logger.go
+6
-5
No files found.
core/vm/logger.go
View file @
43cd31ea
...
...
@@ -322,20 +322,21 @@ func (t *mdLogger) CaptureStart(from common.Address, to common.Address, create b
func
(
t
*
mdLogger
)
CaptureState
(
env
*
EVM
,
pc
uint64
,
op
OpCode
,
gas
,
cost
uint64
,
memory
*
Memory
,
stack
*
Stack
,
rStack
*
ReturnStack
,
rData
[]
byte
,
contract
*
Contract
,
depth
int
,
err
error
)
error
{
fmt
.
Fprintf
(
t
.
out
,
"| %4d | %10v | %3d |"
,
pc
,
op
,
cost
)
if
!
t
.
cfg
.
DisableStack
{
// format stack
if
!
t
.
cfg
.
DisableStack
{
// format stack
var
a
[]
string
for
_
,
elem
:=
range
stack
.
data
{
a
=
append
(
a
,
fmt
.
Sprintf
(
"%d"
,
elem
))
}
b
:=
fmt
.
Sprintf
(
"[%v]"
,
strings
.
Join
(
a
,
","
))
fmt
.
Fprintf
(
t
.
out
,
"%10v |"
,
b
)
}
if
!
t
.
cfg
.
DisableStack
{
// format return stack
var
a
[]
string
// format return stack
a
=
a
[
:
0
]
for
_
,
elem
:=
range
rStack
.
data
{
a
=
append
(
a
,
fmt
.
Sprintf
(
"%2d"
,
elem
))
}
b
:
=
fmt
.
Sprintf
(
"[%v]"
,
strings
.
Join
(
a
,
","
))
b
=
fmt
.
Sprintf
(
"[%v]"
,
strings
.
Join
(
a
,
","
))
fmt
.
Fprintf
(
t
.
out
,
"%10v |"
,
b
)
}
fmt
.
Fprintln
(
t
.
out
,
""
)
...
...
This diff is collapsed.
Click to expand it.
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