Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
exchain
nebula
Commits
a01fa60c
Unverified
Commit
a01fa60c
authored
Dec 21, 2024
by
zhiqiangxu
Committed by
GitHub
Dec 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show label on `Host.onFault` (#13503)
* show label on fault * also show label for onExit
parent
28c8c06c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
script.go
op-chain-ops/script/script.go
+3
-3
No files found.
op-chain-ops/script/script.go
View file @
a01fa60c
...
@@ -531,9 +531,9 @@ func (h *Host) onExit(depth int, output []byte, gasUsed uint64, err error, rever
...
@@ -531,9 +531,9 @@ func (h *Host) onExit(depth int, output []byte, gasUsed uint64, err error, rever
if
reverted
{
if
reverted
{
h
.
LogCallStack
()
h
.
LogCallStack
()
if
msg
,
revertInspectErr
:=
abi
.
UnpackRevert
(
output
);
revertInspectErr
==
nil
{
if
msg
,
revertInspectErr
:=
abi
.
UnpackRevert
(
output
);
revertInspectErr
==
nil
{
h
.
log
.
Warn
(
"Revert"
,
"addr"
,
addr
,
"err"
,
err
,
"revertMsg"
,
msg
,
"depth"
,
depth
)
h
.
log
.
Warn
(
"Revert"
,
"addr"
,
addr
,
"
label"
,
h
.
labels
[
addr
],
"
err"
,
err
,
"revertMsg"
,
msg
,
"depth"
,
depth
)
}
else
{
}
else
{
h
.
log
.
Warn
(
"Revert"
,
"addr"
,
addr
,
"err"
,
err
,
"revertData"
,
hexutil
.
Bytes
(
output
),
"depth"
,
depth
)
h
.
log
.
Warn
(
"Revert"
,
"addr"
,
addr
,
"
label"
,
h
.
labels
[
addr
],
"
err"
,
err
,
"revertData"
,
hexutil
.
Bytes
(
output
),
"depth"
,
depth
)
}
}
}
}
...
@@ -543,7 +543,7 @@ func (h *Host) onExit(depth int, output []byte, gasUsed uint64, err error, rever
...
@@ -543,7 +543,7 @@ func (h *Host) onExit(depth int, output []byte, gasUsed uint64, err error, rever
// onFault is a trace-hook, catches things more generic than regular EVM reverts.
// onFault is a trace-hook, catches things more generic than regular EVM reverts.
func
(
h
*
Host
)
onFault
(
pc
uint64
,
op
byte
,
gas
,
cost
uint64
,
scope
tracing
.
OpContext
,
depth
int
,
err
error
)
{
func
(
h
*
Host
)
onFault
(
pc
uint64
,
op
byte
,
gas
,
cost
uint64
,
scope
tracing
.
OpContext
,
depth
int
,
err
error
)
{
h
.
log
.
Warn
(
"Fault"
,
"addr"
,
scope
.
Address
(),
"err"
,
err
,
"depth"
,
depth
)
h
.
log
.
Warn
(
"Fault"
,
"addr"
,
scope
.
Address
(),
"
label"
,
h
.
labels
[
scope
.
Address
()],
"
err"
,
err
,
"depth"
,
depth
)
}
}
// unwindCallstack is a helper to remove call-stack entries.
// unwindCallstack is a helper to remove call-stack entries.
...
...
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