tree-walk: replace hard-coded constants with the_hash_algo