Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ uint64_t estimator::estimate(size_t target, mode mode) const NOEXCEPT
estimate = std::max({ fee1, fee2, fee3 });
break;
}
case mode::unknown:
{
break;
}
}

return estimate;
Expand Down
10 changes: 10 additions & 0 deletions test/estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ BOOST_AUTO_TEST_CASE(estimator__top_height__non_default__expected)
BOOST_REQUIRE_EQUAL(instance->top_height(), 42u);
}

// estimate

BOOST_AUTO_TEST_CASE(estimator__estimate__unknown_mode__max_uint64)
{
const auto instance = acessor::create();
const auto estimate = instance->estimate(0u, estimator::mode::unknown);

BOOST_REQUIRE_EQUAL(estimate, max_uint64);
}

// initialize

BOOST_AUTO_TEST_CASE(estimator__initialize__empty__true_height_unchanged)
Expand Down
Loading