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
8507c867
Commit
8507c867
authored
Jun 11, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix geth blocktest command
parent
69312673
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
blocktestcmd.go
cmd/geth/blocktestcmd.go
+1
-0
block_test_util.go
tests/block_test_util.go
+2
-2
No files found.
cmd/geth/blocktestcmd.go
View file @
8507c867
...
@@ -86,6 +86,7 @@ func runBlockTest(ctx *cli.Context) {
...
@@ -86,6 +86,7 @@ func runBlockTest(ctx *cli.Context) {
}
}
func
runOneBlockTest
(
ctx
*
cli
.
Context
,
test
*
tests
.
BlockTest
)
(
*
eth
.
Ethereum
,
error
)
{
func
runOneBlockTest
(
ctx
*
cli
.
Context
,
test
*
tests
.
BlockTest
)
(
*
eth
.
Ethereum
,
error
)
{
// TODO remove in favor of logic contained in tests package
cfg
:=
utils
.
MakeEthConfig
(
ClientIdentifier
,
Version
,
ctx
)
cfg
:=
utils
.
MakeEthConfig
(
ClientIdentifier
,
Version
,
ctx
)
cfg
.
NewDB
=
func
(
path
string
)
(
common
.
Database
,
error
)
{
return
ethdb
.
NewMemDatabase
()
}
cfg
.
NewDB
=
func
(
path
string
)
(
common
.
Database
,
error
)
{
return
ethdb
.
NewMemDatabase
()
}
cfg
.
MaxPeers
=
0
// disable network
cfg
.
MaxPeers
=
0
// disable network
...
...
tests/block_test_util.go
View file @
8507c867
...
@@ -85,7 +85,7 @@ type btTransaction struct {
...
@@ -85,7 +85,7 @@ type btTransaction struct {
}
}
func
RunBlockTest
(
filepath
string
)
error
{
func
RunBlockTest
(
filepath
string
)
error
{
bt
,
err
:=
l
oadBlockTests
(
filepath
)
bt
,
err
:=
L
oadBlockTests
(
filepath
)
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
...
@@ -449,7 +449,7 @@ func mustConvertUint(in string, base int) uint64 {
...
@@ -449,7 +449,7 @@ func mustConvertUint(in string, base int) uint64 {
return
out
return
out
}
}
func
l
oadBlockTests
(
file
string
)
(
map
[
string
]
*
BlockTest
,
error
)
{
func
L
oadBlockTests
(
file
string
)
(
map
[
string
]
*
BlockTest
,
error
)
{
bt
:=
make
(
map
[
string
]
*
btJSON
)
bt
:=
make
(
map
[
string
]
*
btJSON
)
if
err
:=
readTestFile
(
file
,
&
bt
);
err
!=
nil
{
if
err
:=
readTestFile
(
file
,
&
bt
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
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