diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-19 23:14:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-19 23:14:15 +0800 |
commit | dcf1a1988ab692664a21bafbd534eb30c9f5adf6 (patch) | |
tree | 63a96b3ef9867d727b46374cc962dce11c66f082 /eth/downloader/downloader.go | |
parent | 8eff550e8b9bf121c27a4c2469ec9878d803a60e (diff) | |
download | dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar.gz dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar.bz2 dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar.lz dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar.xz dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.tar.zst dexon-dcf1a1988ab692664a21bafbd534eb30c9f5adf6.zip |
moved
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r-- | eth/downloader/downloader.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 2b9d1cbee..f8fc4fc30 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -359,6 +359,12 @@ out: return nil } +// Deliver a chunk to the downloader. This is usually done through the BlocksMsg by +// the protocol handler. +func (d *Downloader) DeliverChunk(id string, blocks []*types.Block) { + d.blockCh <- blockPack{id, blocks} +} + func (d *Downloader) AddHashes(id string, hashes []common.Hash) error { // make sure that the hashes that are being added are actually from the peer // that's the current active peer. hashes that have been received from other @@ -422,12 +428,6 @@ func (d *Downloader) AddBlock(id string, block *types.Block, td *big.Int) error return d.process() } -// Deliver a chunk to the downloader. This is usually done through the BlocksMsg by -// the protocol handler. -func (d *Downloader) DeliverChunk(id string, blocks []*types.Block) { - d.blockCh <- blockPack{id, blocks} -} - func (d *Downloader) process() error { atomic.StoreInt32(&d.processingBlocks, 1) defer atomic.StoreInt32(&d.processingBlocks, 0) |