From 55e6ba49cb8276c043203099f61d7940997b5dd9 Mon Sep 17 00:00:00 2001 From: Lee *!* Clagett Date: Mon, 24 Mar 2025 10:56:53 -0400 Subject: [PATCH] Fix expected hash check --- src/cryptonote_basic/connection_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_basic/connection_context.cpp b/src/cryptonote_basic/connection_context.cpp index 5803fa74a..104571417 100644 --- a/src/cryptonote_basic/connection_context.cpp +++ b/src/cryptonote_basic/connection_context.cpp @@ -85,7 +85,7 @@ namespace cryptonote boost::optional 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]; }