aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-07-03 00:55:18 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-08-24 22:57:28 +0800
commit42f44dda5468000b3b2c005ec485529bc5da3674 (patch)
treec93c9a2734adceac75e48f825076d48325826140 /eth/downloader/downloader.go
parentc51e153b5c5327f971e7b410e49e7babfc3f0b8e (diff)
downloaddexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.gz
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.bz2
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.lz
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.xz
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.tar.zst
dexon-42f44dda5468000b3b2c005ec485529bc5da3674.zip
eth, eth/downloader: handle header requests, table driven proto tests
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index 23d2e045e..6a6bce644 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -39,13 +39,15 @@ import (
const (
eth60 = 60 // Constant to check for old protocol support
eth61 = 61 // Constant to check for new protocol support
- eth62 = 62 // Constant to check for experimental protocol support
)
var (
- MinHashFetch = 512 // Minimum amount of hashes to not consider a peer stalling
- MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request
- MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request
+ MinHashFetch = 512 // Minimum amount of hashes to not consider a peer stalling
+ MaxHashFetch = 512 // Amount of hashes to be fetched per retrieval request
+ MaxBlockFetch = 128 // Amount of blocks to be fetched per retrieval request
+ MaxHeaderFetch = 256 // Amount of block headers to be fetched per retrieval request
+ MaxStateFetch = 384 // Amount of node state values to allow fetching per request
+ MaxReceiptsFetch = 384 // Amount of transaction receipts to allow fetching per request
hashTTL = 5 * time.Second // Time it takes for a hash request to time out
blockSoftTTL = 3 * time.Second // Request completion threshold for increasing or decreasing a peer's bandwidth
@@ -330,7 +332,7 @@ func (d *Downloader) syncWithPeer(p *peer, hash common.Hash, td *big.Int) (err e
if err = d.fetchBlocks60(); err != nil {
return err
}
- case eth61, eth62:
+ case eth61:
// New eth/61, use forward, concurrent hash and block retrieval algorithm
number, err := d.findAncestor(p)
if err != nil {