diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-07-03 00:55:18 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-08-24 22:57:28 +0800 |
commit | 42f44dda5468000b3b2c005ec485529bc5da3674 (patch) | |
tree | c93c9a2734adceac75e48f825076d48325826140 /eth/downloader/downloader.go | |
parent | c51e153b5c5327f971e7b410e49e7babfc3f0b8e (diff) | |
download | go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.gz go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.bz2 go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.lz go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.xz go-tangerine-42f44dda5468000b3b2c005ec485529bc5da3674.tar.zst go-tangerine-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.go | 12 |
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 { |