diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-24 21:04:58 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-24 21:04:58 +0800 |
commit | 31f82eb3347454f64f3d41de3087109d09597806 (patch) | |
tree | ec641ffa199d3139e8e142dbe3c6e71be0df4fd9 /eth/downloader/downloader.go | |
parent | b86e7526e12a5a49c1739ec02d3c1c5cc667dcb3 (diff) | |
download | go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar.gz go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar.bz2 go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar.lz go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar.xz go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.tar.zst go-tangerine-31f82eb3347454f64f3d41de3087109d09597806.zip |
eth, eth/downloader: don't require td on downloader. Fixed tests
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 6ac8310b3..00c4cd88f 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -39,7 +39,6 @@ var ( type hashCheckFn func(common.Hash) bool type chainInsertFn func(types.Blocks) error type hashIterFn func() (common.Hash, error) -type currentTdFn func() *big.Int type blockPack struct { peerId string @@ -61,7 +60,6 @@ type Downloader struct { // Callbacks hasBlock hashCheckFn insertChain chainInsertFn - currentTd currentTdFn // Status fetchingHashes int32 @@ -76,13 +74,12 @@ type Downloader struct { quit chan struct{} } -func New(hasBlock hashCheckFn, insertChain chainInsertFn, currentTd currentTdFn) *Downloader { +func New(hasBlock hashCheckFn, insertChain chainInsertFn) *Downloader { downloader := &Downloader{ queue: newqueue(), peers: make(peers), hasBlock: hasBlock, insertChain: insertChain, - currentTd: currentTd, newPeerCh: make(chan *peer, 1), syncCh: make(chan syncPack, 1), hashCh: make(chan []common.Hash, 1), |