aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/downloader.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-05-14 20:38:49 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-05-14 20:38:49 +0800
commit3eda70c64c3b790573751227f8ac0fe42bdc0307 (patch)
treea5f402ea615e2484bf405f845b77ecd229a5842f /eth/downloader/downloader.go
parenta4246c2da658d9b5b02a4caba511688748a88b19 (diff)
downloadgo-tangerine-3eda70c64c3b790573751227f8ac0fe42bdc0307.tar.gz
go-tangerine-3eda70c64c3b790573751227f8ac0fe42bdc0307.tar.zst
go-tangerine-3eda70c64c3b790573751227f8ac0fe42bdc0307.zip
eth, eth/downloader: remove parent verification from the downlaoder
Diffstat (limited to 'eth/downloader/downloader.go')
-rw-r--r--eth/downloader/downloader.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go
index f33aa334a..fb023c7dd 100644
--- a/eth/downloader/downloader.go
+++ b/eth/downloader/downloader.go
@@ -144,18 +144,8 @@ func (d *Downloader) Synchronise(id string, hash common.Hash) error {
}
// TakeBlocks takes blocks from the queue and yields them to the caller.
-func (d *Downloader) TakeBlocks() (types.Blocks, error) {
- // If the head block is missing, no blocks are ready
- head := d.queue.GetHeadBlock()
- if head == nil {
- return nil, nil
- }
- // If the parent hash of the head is unknown, notify the caller
- if !d.hasBlock(head.ParentHash()) {
- return nil, ErrUnknownParent
- }
- // Otherwise retrieve a full batch of blocks
- return d.queue.TakeBlocks(head), nil
+func (d *Downloader) TakeBlocks() types.Blocks {
+ return d.queue.TakeBlocks()
}
func (d *Downloader) Has(hash common.Hash) bool {