code: func dbFetchBlockIDByHash(dbTx database.Tx, hash *chainhash.Hash) (uint32, error) {
  	hashIndex := dbTx.Metadata().Bucket(idByHashIndexBucketName)
  	serializedID := hashIndex.Get(hash[:])
  	if serializedID == nil {
  		return 0, errNoBlockIDEntry
  	}
  
  	return byteOrder.Uint32(serializedID), nil
  }
docs: // dbFetchBlockIDByHash uses an existing database transaction to retrieve the
  // block id for the provided hash from the index.