code: func (h *headerIndex) heightFromHash(hash *chainhash.Hash) (uint32, error) {
  	var height uint32
  	err := walletdb.View(h.db, func(tx walletdb.ReadTx) error {
  		rootBucket := tx.ReadBucket(indexBucket)
  
  		heightBytes := rootBucket.Get(hash[:])
  		if heightBytes == nil {
  			// If the hash wasn't found, then we don't know of this
  			// hash within the index.
  			return ErrHashNotFound
  		}
  
  		height = binary.BigEndian.Uint32(heightBytes)
  		return nil
  	})
  	if err != nil {
  		return 0, err
  	}
  
  	return height, nil
  }
docs: // heightFromHash returns the height of the entry that matches the specified
  // height. With this height, the caller is then able to seek to the appropriate
  // spot in the flat files in order to extract the true header.