mirror of
https://github.com/monero-project/monero.git
synced 2025-04-18 18:15:50 -04:00
Fix expected hash check
This commit is contained in:
parent
84685492e6
commit
55e6ba49cb
@ -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];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user