bitcoin/bitcoin — pull request #5459 by sipa (2014-12-11 12:36:53+00:00)
Title: Reject headers that build on an invalid parent

Noticed by @gmaxwell: a node keeps downloading blocks after a local error that caused it to treat one block as invalid.