Merge pull request

c8f773501 Fix expected hash check (Lee *!* Clagett)
This commit is contained in:
tobtoht 2025-03-24 13:58:34 +00:00
commit c3dce57a53
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -85,7 +85,7 @@ namespace cryptonote
boost::optional<crypto::hash> cryptonote_connection_context::get_expected_hash(const uint64_t height) const
{
const auto difference = height - m_expected_heights_start;
if (height < m_expected_heights_start || m_expected_heights.size() < difference)
if (height < m_expected_heights_start || m_expected_heights.size() <= difference)
return boost::none;
return m_expected_heights[difference];
}