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
94e525ae
Commit
94e525ae
authored
May 26, 2015
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth, eth/downloader: fix #1098, elevate empty hash errors to peer drops
parent
067e66b3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
downloader.go
eth/downloader/downloader.go
+2
-2
sync.go
eth/sync.go
+1
-1
No files found.
eth/downloader/downloader.go
View file @
94e525ae
...
...
@@ -42,7 +42,7 @@ var (
errNoPeers
=
errors
.
New
(
"no peers to keep download active"
)
ErrPendingQueue
=
errors
.
New
(
"pending items in queue"
)
ErrTimeout
=
errors
.
New
(
"timeout"
)
e
rrEmptyHashSet
=
errors
.
New
(
"empty hash set by peer"
)
E
rrEmptyHashSet
=
errors
.
New
(
"empty hash set by peer"
)
errPeersUnavailable
=
errors
.
New
(
"no peers available or all peers tried for block download process"
)
errAlreadyInPool
=
errors
.
New
(
"hash already in pool"
)
ErrInvalidChain
=
errors
.
New
(
"retrieved hash chain is invalid"
)
...
...
@@ -289,7 +289,7 @@ func (d *Downloader) fetchHashes(p *peer, h common.Hash) error {
// Make sure the peer actually gave something valid
if
len
(
hashPack
.
hashes
)
==
0
{
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"Peer (%s) responded with empty hash set"
,
active
.
id
)
return
e
rrEmptyHashSet
return
E
rrEmptyHashSet
}
for
_
,
hash
:=
range
hashPack
.
hashes
{
if
d
.
banned
.
Has
(
hash
)
{
...
...
eth/sync.go
View file @
94e525ae
...
...
@@ -109,7 +109,7 @@ func (pm *ProtocolManager) synchronise(peer *peer) {
case
downloader
.
ErrBusy
:
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"Synchronisation already in progress"
)
case
downloader
.
ErrTimeout
,
downloader
.
ErrBadPeer
,
downloader
.
ErrInvalidChain
,
downloader
.
ErrCrossCheckFailed
:
case
downloader
.
ErrTimeout
,
downloader
.
ErrBadPeer
,
downloader
.
Err
EmptyHashSet
,
downloader
.
Err
InvalidChain
,
downloader
.
ErrCrossCheckFailed
:
glog
.
V
(
logger
.
Debug
)
.
Infof
(
"Removing peer %v: %v"
,
peer
.
id
,
err
)
pm
.
removePeer
(
peer
.
id
)
...
...
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