good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
43cd31ea
Unverified
Commit
43cd31ea
authored
4 years ago
by
Guillaume Ballet
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
core/vm: dedup config check in markdown logger (#21655)
* core/vm: dedup config check * review feedback: reuse buffer
parent
5e86e4ed
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/vm/logger.go
+6
-5
6 additions, 5 deletions
core/vm/logger.go
with
6 additions
and
5 deletions
core/vm/logger.go
+
6
−
5
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.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment