mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-29 09:22:32 +00:00
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
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…
x
Reference in New Issue
Block a user