code: func (b *BlockChain) MainChainHasBlock(hash *chainhash.Hash) bool {
  	node := b.index.LookupNode(hash)
  	return node != nil && b.bestChain.Contains(node)
  }
docs: // MainChainHasBlock returns whether or not the block with the given hash is in
  // the main chain.
  //
  // This function is safe for concurrent access.