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
28704961
Commit
28704961
authored
Apr 12, 2017
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: don't import genesis block in TestDAOForkRangeExtradata
The genesis block doesn't have a valid ancestor.
parent
30d706c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dao_test.go
core/dao_test.go
+4
-4
No files found.
core/dao_test.go
View file @
28704961
...
...
@@ -62,7 +62,7 @@ func TestDAOForkRangeExtradata(t *testing.T) {
gspec
.
MustCommit
(
db
)
bc
,
_
:=
NewBlockChain
(
db
,
conConf
,
ethash
.
NewFaker
(),
new
(
event
.
TypeMux
),
vm
.
Config
{})
blocks
:=
conBc
.
GetBlocksFromHash
(
conBc
.
CurrentBlock
()
.
Hash
(),
int
(
conBc
.
CurrentBlock
()
.
NumberU64
()
+
1
))
blocks
:=
conBc
.
GetBlocksFromHash
(
conBc
.
CurrentBlock
()
.
Hash
(),
int
(
conBc
.
CurrentBlock
()
.
NumberU64
()))
for
j
:=
0
;
j
<
len
(
blocks
)
/
2
;
j
++
{
blocks
[
j
],
blocks
[
len
(
blocks
)
-
1
-
j
]
=
blocks
[
len
(
blocks
)
-
1
-
j
],
blocks
[
j
]
}
...
...
@@ -83,7 +83,7 @@ func TestDAOForkRangeExtradata(t *testing.T) {
gspec
.
MustCommit
(
db
)
bc
,
_
=
NewBlockChain
(
db
,
proConf
,
ethash
.
NewFaker
(),
new
(
event
.
TypeMux
),
vm
.
Config
{})
blocks
=
proBc
.
GetBlocksFromHash
(
proBc
.
CurrentBlock
()
.
Hash
(),
int
(
proBc
.
CurrentBlock
()
.
NumberU64
()
+
1
))
blocks
=
proBc
.
GetBlocksFromHash
(
proBc
.
CurrentBlock
()
.
Hash
(),
int
(
proBc
.
CurrentBlock
()
.
NumberU64
()))
for
j
:=
0
;
j
<
len
(
blocks
)
/
2
;
j
++
{
blocks
[
j
],
blocks
[
len
(
blocks
)
-
1
-
j
]
=
blocks
[
len
(
blocks
)
-
1
-
j
],
blocks
[
j
]
}
...
...
@@ -105,7 +105,7 @@ func TestDAOForkRangeExtradata(t *testing.T) {
gspec
.
MustCommit
(
db
)
bc
,
_
:=
NewBlockChain
(
db
,
conConf
,
ethash
.
NewFaker
(),
new
(
event
.
TypeMux
),
vm
.
Config
{})
blocks
:=
conBc
.
GetBlocksFromHash
(
conBc
.
CurrentBlock
()
.
Hash
(),
int
(
conBc
.
CurrentBlock
()
.
NumberU64
()
+
1
))
blocks
:=
conBc
.
GetBlocksFromHash
(
conBc
.
CurrentBlock
()
.
Hash
(),
int
(
conBc
.
CurrentBlock
()
.
NumberU64
()))
for
j
:=
0
;
j
<
len
(
blocks
)
/
2
;
j
++
{
blocks
[
j
],
blocks
[
len
(
blocks
)
-
1
-
j
]
=
blocks
[
len
(
blocks
)
-
1
-
j
],
blocks
[
j
]
}
...
...
@@ -121,7 +121,7 @@ func TestDAOForkRangeExtradata(t *testing.T) {
gspec
.
MustCommit
(
db
)
bc
,
_
=
NewBlockChain
(
db
,
proConf
,
ethash
.
NewFaker
(),
new
(
event
.
TypeMux
),
vm
.
Config
{})
blocks
=
proBc
.
GetBlocksFromHash
(
proBc
.
CurrentBlock
()
.
Hash
(),
int
(
proBc
.
CurrentBlock
()
.
NumberU64
()
+
1
))
blocks
=
proBc
.
GetBlocksFromHash
(
proBc
.
CurrentBlock
()
.
Hash
(),
int
(
proBc
.
CurrentBlock
()
.
NumberU64
()))
for
j
:=
0
;
j
<
len
(
blocks
)
/
2
;
j
++
{
blocks
[
j
],
blocks
[
len
(
blocks
)
-
1
-
j
]
=
blocks
[
len
(
blocks
)
-
1
-
j
],
blocks
[
j
]
}
...
...
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