code: func (h *BlockHeader) BlockHash() chainhash.Hash {
  	// Encode the header and double sha256 everything prior to the number of
  	// transactions.  Ignore the error returns since there is no way the
  	// encode could fail except being out of memory which would cause a
  	// run-time panic.
  	buf := bytes.NewBuffer(make([]byte, 0, MaxBlockHeaderPayload))
  	_ = writeBlockHeader(buf, 0, h)
  
  	return chainhash.DoubleHashH(buf.Bytes())
  }
docs: // BlockHash computes the block identifier hash for the given block header.