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
5566e5d1
Unverified
Commit
5566e5d1
authored
Aug 18, 2021
by
chuwt
Committed by
GitHub
Aug 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: fix typo in comment (#23413)
parent
57feabea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
freezer.go
core/rawdb/freezer.go
+1
-1
downloader.go
eth/downloader/downloader.go
+2
-2
No files found.
core/rawdb/freezer.go
View file @
5566e5d1
...
@@ -414,7 +414,7 @@ func (f *freezer) freeze(db ethdb.KeyValueStore) {
...
@@ -414,7 +414,7 @@ func (f *freezer) freeze(db ethdb.KeyValueStore) {
}
}
batch
.
Reset
()
batch
.
Reset
()
// Wipe out side chains also and track dangling side ch
ia
ns
// Wipe out side chains also and track dangling side ch
ai
ns
var
dangling
[]
common
.
Hash
var
dangling
[]
common
.
Hash
for
number
:=
first
;
number
<
f
.
frozen
;
number
++
{
for
number
:=
first
;
number
<
f
.
frozen
;
number
++
{
// Always keep the genesis block in active database
// Always keep the genesis block in active database
...
...
eth/downloader/downloader.go
View file @
5566e5d1
...
@@ -465,7 +465,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I
...
@@ -465,7 +465,7 @@ func (d *Downloader) syncWithPeer(p *peerConnection, hash common.Hash, td *big.I
}
}
if
mode
==
FastSync
&&
pivot
==
nil
{
if
mode
==
FastSync
&&
pivot
==
nil
{
// If no pivot block was returned, the head is below the min full block
// If no pivot block was returned, the head is below the min full block
// threshold (i.e. new ch
ia
n). In that case we won't really fast sync
// threshold (i.e. new ch
ai
n). In that case we won't really fast sync
// anyway, but still need a valid pivot block to avoid some code hitting
// anyway, but still need a valid pivot block to avoid some code hitting
// nil panics on an access.
// nil panics on an access.
pivot
=
d
.
blockchain
.
CurrentBlock
()
.
Header
()
pivot
=
d
.
blockchain
.
CurrentBlock
()
.
Header
()
...
@@ -681,7 +681,7 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty
...
@@ -681,7 +681,7 @@ func (d *Downloader) fetchHead(p *peerConnection) (head *types.Header, pivot *ty
return
head
,
nil
,
nil
return
head
,
nil
,
nil
}
}
// At this point we have 2 headers in total and the first is the
// At this point we have 2 headers in total and the first is the
// validated head of the ch
ia
n. Check the pivot number and return,
// validated head of the ch
ai
n. Check the pivot number and return,
pivot
:=
headers
[
1
]
pivot
:=
headers
[
1
]
if
pivot
.
Number
.
Uint64
()
!=
head
.
Number
.
Uint64
()
-
uint64
(
fsMinFullBlocks
)
{
if
pivot
.
Number
.
Uint64
()
!=
head
.
Number
.
Uint64
()
-
uint64
(
fsMinFullBlocks
)
{
return
nil
,
nil
,
fmt
.
Errorf
(
"%w: remote pivot %d != requested %d"
,
errInvalidChain
,
pivot
.
Number
,
head
.
Number
.
Uint64
()
-
uint64
(
fsMinFullBlocks
))
return
nil
,
nil
,
fmt
.
Errorf
(
"%w: remote pivot %d != requested %d"
,
errInvalidChain
,
pivot
.
Number
,
head
.
Number
.
Uint64
()
-
uint64
(
fsMinFullBlocks
))
...
...
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