Fix previous. We care if we have the block OR it is an orphan, not both.

This commit is contained in:
Owain G. Ainsworth 2013-10-09 16:35:33 +01:00
parent b911e7e455
commit cdc3002c85

View file

@ -173,7 +173,7 @@ func (b *BlockChain) DisableVerify(disable bool) {
//
// This function is NOT safe for concurrent access.
func (b *BlockChain) HaveBlock(hash *btcwire.ShaHash) bool {
return b.IsKnownOrphan(hash) && b.blockExists(hash)
return b.IsKnownOrphan(hash) || b.blockExists(hash)
}
// IsKnownOrphan returns whether the passed hash is currently a known orphan.