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
5aa3eac2
Commit
5aa3eac2
authored
Nov 16, 2017
by
jtakalai
Committed by
Péter Szilágyi
Nov 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth/downloader: minor comments cleanup (#15495)
it's -> its pet peeve, and I like to imagine I'm not alone.
parent
bb57f1f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
downloader.go
eth/downloader/downloader.go
+5
-5
No files found.
eth/downloader/downloader.go
View file @
5aa3eac2
...
...
@@ -333,7 +333,7 @@ func (d *Downloader) Synchronise(id string, head common.Hash, td *big.Int, mode
}
// synchronise will select the peer and use it for synchronising. If an empty string is given
// it will use the best peer possible and synchronize if it
'
s TD is higher than our own. If any of the
// it will use the best peer possible and synchronize if its TD is higher than our own. If any of the
// checks fail an error will be returned. This method is synchronous
func
(
d
*
Downloader
)
synchronise
(
id
string
,
hash
common
.
Hash
,
td
*
big
.
Int
,
mode
SyncMode
)
error
{
// Mock out the synchronisation if testing
...
...
@@ -1003,8 +1003,8 @@ func (d *Downloader) fetchParts(errCancel error, deliveryCh chan dataPack, deliv
return
errCancel
case
packet
:=
<-
deliveryCh
:
// If the peer was previously banned and failed to deliver it
'
s pack
// in a reasonable time frame, ignore it
'
s message.
// If the peer was previously banned and failed to deliver its pack
// in a reasonable time frame, ignore its message.
if
peer
:=
d
.
peers
.
Peer
(
packet
.
PeerId
());
peer
!=
nil
{
// Deliver the received chunk of data and check chain validity
accepted
,
err
:=
deliver
(
packet
)
...
...
@@ -1205,8 +1205,8 @@ func (d *Downloader) processHeaders(origin uint64, td *big.Int) error {
case
<-
d
.
cancelCh
:
}
}
// If no headers were retrieved at all, the peer violated it
'
s TD promise that it had a
// better chain compared to ours. The only exception is if it
'
s promised blocks were
// If no headers were retrieved at all, the peer violated its TD promise that it had a
// better chain compared to ours. The only exception is if its promised blocks were
// already imported by other means (e.g. fecher):
//
// R <remote peer>, L <local node>: Both at block 10
...
...
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