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
59c0d014
Commit
59c0d014
authored
May 18, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: chain manager no longer exports genesis block
parent
bc5e60cd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
js_test.go
cmd/geth/js_test.go
+2
-0
chain_manager.go
core/chain_manager.go
+2
-2
No files found.
cmd/geth/js_test.go
View file @
59c0d014
...
...
@@ -172,6 +172,8 @@ func TestBlockChain(t *testing.T) {
tmpfile
:=
filepath
.
Join
(
extmp
,
"export.chain"
)
tmpfileq
:=
strconv
.
Quote
(
tmpfile
)
ethereum
.
ChainManager
()
.
Reset
()
checkEvalJSON
(
t
,
repl
,
`admin.export(`
+
tmpfileq
+
`)`
,
`true`
)
if
_
,
err
:=
os
.
Stat
(
tmpfile
);
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
core/chain_manager.go
View file @
59c0d014
...
...
@@ -348,7 +348,7 @@ func (self *ChainManager) Export(w io.Writer) error {
last
:=
self
.
currentBlock
.
NumberU64
()
for
nr
:=
uint64
(
0
);
nr
<=
last
;
nr
++
{
for
nr
:=
uint64
(
1
);
nr
<=
last
;
nr
++
{
block
:=
self
.
GetBlockByNumber
(
nr
)
if
block
==
nil
{
return
fmt
.
Errorf
(
"export failed on #%d: not found"
,
nr
)
...
...
@@ -789,7 +789,7 @@ func verifyNonces(pow pow.PoW, blocks []*types.Block) error {
func
verifyNonce
(
pow
pow
.
PoW
,
in
<-
chan
*
types
.
Block
,
done
chan
<-
error
)
{
for
block
:=
range
in
{
if
!
pow
.
Verify
(
block
)
{
done
<-
ValidationError
(
"Block
's nonce is invalid (= %x)"
,
block
.
Nonce
)
done
<-
ValidationError
(
"Block
(#%v) nonce is invalid (= %x)"
,
block
.
Number
()
,
block
.
Nonce
)
}
else
{
done
<-
nil
}
...
...
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