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
ed07ffcd
Commit
ed07ffcd
authored
Apr 19, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
downloader: fixed tests with low ttl
parent
dcf1a198
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
downloader.go
eth/downloader/downloader.go
+2
-2
downloader_test.go
eth/downloader/downloader_test.go
+1
-0
No files found.
eth/downloader/downloader.go
View file @
ed07ffcd
...
@@ -20,12 +20,12 @@ import (
...
@@ -20,12 +20,12 @@ import (
const
(
const
(
maxBlockFetch
=
256
// Amount of max blocks to be fetched per chunk
maxBlockFetch
=
256
// Amount of max blocks to be fetched per chunk
peerCountTimeout
=
12
*
time
.
Second
// Amount of time it takes for the peer handler to ignore minDesiredPeerCount
peerCountTimeout
=
12
*
time
.
Second
// Amount of time it takes for the peer handler to ignore minDesiredPeerCount
blockTtl
=
20
*
time
.
Second
// The amount of time it takes for a block request to time out
hashTtl
=
20
*
time
.
Second
// The amount of time it takes for a hash request to time out
hashTtl
=
20
*
time
.
Second
// The amount of time it takes for a hash request to time out
)
)
var
(
var
(
minDesiredPeerCount
=
5
// Amount of peers desired to start syncing
minDesiredPeerCount
=
5
// Amount of peers desired to start syncing
blockTtl
=
20
*
time
.
Second
// The amount of time it takes for a block request to time out
errLowTd
=
errors
.
New
(
"peer's TD is too low"
)
errLowTd
=
errors
.
New
(
"peer's TD is too low"
)
errBusy
=
errors
.
New
(
"busy"
)
errBusy
=
errors
.
New
(
"busy"
)
...
...
eth/downloader/downloader_test.go
View file @
ed07ffcd
...
@@ -110,6 +110,7 @@ func TestDownload(t *testing.T) {
...
@@ -110,6 +110,7 @@ func TestDownload(t *testing.T) {
glog
.
SetToStderr
(
true
)
glog
.
SetToStderr
(
true
)
minDesiredPeerCount
=
4
minDesiredPeerCount
=
4
blockTtl
=
1
*
time
.
Second
hashes
:=
createHashes
(
0
,
1000
)
hashes
:=
createHashes
(
0
,
1000
)
blocks
:=
createBlocksFromHashes
(
hashes
)
blocks
:=
createBlocksFromHashes
(
hashes
)
...
...
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