diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:56:53 -0800 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:56:53 -0800 |
commit | d6b2c676a94864913c72c8fcdb70034e4d22b2e4 (patch) | |
tree | 4761157826e2109654f1a32dc23fe4373ebf9001 /src/cryptonote_protocol | |
parent | Merge pull request #7116 (diff) | |
parent | protocol: add a sanity check to the number of block hashes sent (diff) | |
download | monero-d6b2c676a94864913c72c8fcdb70034e4d22b2e4.tar.xz |
Merge pull request #7118
ef1524ecc protocol: add a sanity check to the number of block hashes sent (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol')
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 37157e637..4e3470068 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -2505,7 +2505,7 @@ skip: } MDEBUG(context << "first block hash " << arg.m_block_ids.front() << ", last " << arg.m_block_ids.back()); - if (arg.total_height >= CRYPTONOTE_MAX_BLOCK_NUMBER || arg.m_block_ids.size() >= CRYPTONOTE_MAX_BLOCK_NUMBER) + if (arg.total_height >= CRYPTONOTE_MAX_BLOCK_NUMBER || arg.m_block_ids.size() > BLOCKS_IDS_SYNCHRONIZING_MAX_COUNT) { LOG_ERROR_CCONTEXT("sent wrong NOTIFY_RESPONSE_CHAIN_ENTRY, with total_height=" << arg.total_height << " and block_ids=" << arg.m_block_ids.size()); drop_connection(context, false, false); |