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
eb2b8cb4
Unverified
Commit
eb2b8cb4
authored
Jul 25, 2022
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/tracers/js: fix capitalization in tests
parent
b196ad1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tracer_test.go
eth/tracers/js/tracer_test.go
+5
-5
No files found.
eth/tracers/js/tracer_test.go
View file @
eb2b8cb4
...
@@ -103,15 +103,15 @@ func TestTracer(t *testing.T) {
...
@@ -103,15 +103,15 @@ func TestTracer(t *testing.T) {
{
// tests that we don't panic on bad arguments to memory access
{
// tests that we don't panic on bad arguments to memory access
code
:
"{depths: [], step: function(log) { this.depths.push(log.memory.slice(-1,-2)); }, fault: function() {}, result: function() { return this.depths; }}"
,
code
:
"{depths: [], step: function(log) { this.depths.push(log.memory.slice(-1,-2)); }, fault: function() {}, result: function() { return this.depths; }}"
,
want
:
``
,
want
:
``
,
fail
:
"
T
racer accessed out of bound memory: offset -1, end -2 at step (<eval>:1:53(15)) in server-side tracer function 'step'"
,
fail
:
"
t
racer accessed out of bound memory: offset -1, end -2 at step (<eval>:1:53(15)) in server-side tracer function 'step'"
,
},
{
// tests that we don't panic on bad arguments to stack peeks
},
{
// tests that we don't panic on bad arguments to stack peeks
code
:
"{depths: [], step: function(log) { this.depths.push(log.stack.peek(-1)); }, fault: function() {}, result: function() { return this.depths; }}"
,
code
:
"{depths: [], step: function(log) { this.depths.push(log.stack.peek(-1)); }, fault: function() {}, result: function() { return this.depths; }}"
,
want
:
``
,
want
:
``
,
fail
:
"
T
racer accessed out of bound stack: size 0, index -1 at step (<eval>:1:53(13)) in server-side tracer function 'step'"
,
fail
:
"
t
racer accessed out of bound stack: size 0, index -1 at step (<eval>:1:53(13)) in server-side tracer function 'step'"
,
},
{
// tests that we don't panic on bad arguments to memory getUint
},
{
// tests that we don't panic on bad arguments to memory getUint
code
:
"{ depths: [], step: function(log, db) { this.depths.push(log.memory.getUint(-64));}, fault: function() {}, result: function() { return this.depths; }}"
,
code
:
"{ depths: [], step: function(log, db) { this.depths.push(log.memory.getUint(-64));}, fault: function() {}, result: function() { return this.depths; }}"
,
want
:
``
,
want
:
``
,
fail
:
"
T
racer accessed out of bound memory: available 0, offset -64, size 32 at step (<eval>:1:58(13)) in server-side tracer function 'step'"
,
fail
:
"
t
racer accessed out of bound memory: available 0, offset -64, size 32 at step (<eval>:1:58(13)) in server-side tracer function 'step'"
,
},
{
// tests some general counting
},
{
// tests some general counting
code
:
"{count: 0, step: function() { this.count += 1; }, fault: function() {}, result: function() { return this.count; }}"
,
code
:
"{count: 0, step: function() { this.count += 1; }, fault: function() {}, result: function() { return this.count; }}"
,
want
:
`3`
,
want
:
`3`
,
...
@@ -232,7 +232,7 @@ func TestIsPrecompile(t *testing.T) {
...
@@ -232,7 +232,7 @@ func TestIsPrecompile(t *testing.T) {
t
.
Error
(
err
)
t
.
Error
(
err
)
}
}
if
string
(
res
)
!=
"false"
{
if
string
(
res
)
!=
"false"
{
t
.
Errorf
(
"
T
racer should not consider blake2f as precompile in byzantium"
)
t
.
Errorf
(
"
t
racer should not consider blake2f as precompile in byzantium"
)
}
}
tracer
,
_
=
newJsTracer
(
"{addr: toAddress('0000000000000000000000000000000000000009'), res: null, step: function() { this.res = isPrecompiled(this.addr); }, fault: function() {}, result: function() { return this.res; }}"
,
nil
)
tracer
,
_
=
newJsTracer
(
"{addr: toAddress('0000000000000000000000000000000000000009'), res: null, step: function() { this.res = isPrecompiled(this.addr); }, fault: function() {}, result: function() { return this.res; }}"
,
nil
)
...
@@ -242,7 +242,7 @@ func TestIsPrecompile(t *testing.T) {
...
@@ -242,7 +242,7 @@ func TestIsPrecompile(t *testing.T) {
t
.
Error
(
err
)
t
.
Error
(
err
)
}
}
if
string
(
res
)
!=
"true"
{
if
string
(
res
)
!=
"true"
{
t
.
Errorf
(
"
T
racer should consider blake2f as precompile in istanbul"
)
t
.
Errorf
(
"
t
racer should consider blake2f as precompile in istanbul"
)
}
}
}
}
...
...
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