eth: adapted to new synchronous api of downloader's AddBlock

This commit is contained in:
obscuren
2015-04-18 18:55:50 +02:00
parent c2c24b3bb4
commit 0d536734fe
3 changed files with 14 additions and 4 deletions

View File

@ -173,8 +173,6 @@ out:
select {
case sync := <-d.syncCh:
var peer *peer = sync.peer
d.activePeer = peer.id
err := d.getFromPeer(peer, sync.hash, sync.ignoreInitial)
if err != nil {
break

View File

@ -50,6 +50,8 @@ func (d *Downloader) Synchronise() (types.Blocks, error) {
}
func (d *Downloader) getFromPeer(p *peer, hash common.Hash, ignoreInitial bool) error {
d.activePeer = p.id
glog.V(logger.Detail).Infoln("Synchronising with the network using:", p.id)
// Start the fetcher. This will block the update entirely
// interupts need to be send to the appropriate channels