Skip to content

Commit 66d8aa3

Browse files
committed
Avoid unnecessary function call in is_root_position.
1 parent e8c8f08 commit 66d8aa3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

test/utreexo/utreexo.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ constexpr bool is_root_position(uint64_t position, uint64_t leaves,
127127
uint8_t forest_rows) NOEXCEPT
128128
{
129129
const auto row = detect_row(position, forest_rows);
130-
const auto present = get_right(leaves, row);
131-
const auto expected = root_position(leaves, row, forest_rows);
132-
return present && (position == expected);
130+
return get_right(leaves, row) &&
131+
(position == root_position(leaves, row, forest_rows));
133132
}
134133

135134
constexpr uint64_t remove_bit(uint64_t value, size_t bit) NOEXCEPT

0 commit comments

Comments
 (0)