core: added chain head reset to known block

This commit is contained in:
obscuren
2015-04-20 12:29:02 +02:00
parent 52584596d4
commit 45da3e17e2
4 changed files with 66 additions and 12 deletions

View File

@ -472,6 +472,8 @@ func (d *Downloader) process() error {
}
break
} else if err != nil {
// immediatly unregister the false peer but do not disconnect
d.UnregisterPeer(d.activePeer)
// Reset chain completely. This needs much, much improvement.
// instead: check all blocks leading down to this block false block and remove it
blocks = nil