good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
ed07ffcd
Commit
ed07ffcd
authored
Apr 19, 2015
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
downloader: fixed tests with low ttl
parent
dcf1a198
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
eth/downloader/downloader.go
+2
-2
2 additions, 2 deletions
eth/downloader/downloader.go
eth/downloader/downloader_test.go
+1
-0
1 addition, 0 deletions
eth/downloader/downloader_test.go
with
3 additions
and
2 deletions
eth/downloader/downloader.go
+
2
−
2
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"
)
...
...
This diff is collapsed.
Click to expand it.
eth/downloader/downloader_test.go
+
1
−
0
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment