Fix previous. We care if we have the block OR it is an orphan, not both.
This commit is contained in:
parent
b911e7e455
commit
cdc3002c85
1 changed files with 1 additions and 1 deletions
2
chain.go
2
chain.go
|
@ -173,7 +173,7 @@ func (b *BlockChain) DisableVerify(disable bool) {
|
||||||
//
|
//
|
||||||
// This function is NOT safe for concurrent access.
|
// This function is NOT safe for concurrent access.
|
||||||
func (b *BlockChain) HaveBlock(hash *btcwire.ShaHash) bool {
|
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.
|
// IsKnownOrphan returns whether the passed hash is currently a known orphan.
|
||||||
|
|
Loading…
Reference in a new issue