code: func (bi *blockIndex) HaveBlock(hash *chainhash.Hash) bool {
  	bi.RLock()
  	_, hasBlock := bi.index[*hash]
  	bi.RUnlock()
  	return hasBlock
  }
docs: // HaveBlock returns whether or not the block index contains the provided hash.
  //
  // This function is safe for concurrent access.