eth, eth/downloader: do async block fetches, add dl tests

This commit is contained in:
Péter Szilágyi
2015-06-15 12:26:05 +03:00
parent 30a9939388
commit b240983e2b
3 changed files with 47 additions and 5 deletions

View File

@ -171,7 +171,7 @@ func (pm *ProtocolManager) fetcher() {
// Send out all block requests
for peer, hashes := range request {
glog.V(logger.Debug).Infof("Explicitly fetching %d blocks from %s", len(hashes), peer.id)
peer.requestBlocks(hashes)
go peer.requestBlocks(hashes)
}
request = make(map[*peer][]common.Hash)