good morning!!!!

Skip to content
Snippets Groups Projects
Commit ed07ffcd authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

downloader: fixed tests with low ttl

parent dcf1a198
Branches
Tags
No related merge requests found
...@@ -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")
......
...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment