diff options
| author | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:43:41 -0800 |
|---|---|---|
| committer | Alexander Blair <snipa@jagtech.io> | 2020-12-10 17:43:41 -0800 |
| commit | bdaadf85dc34da357fcc0248ae15aa4ea803ea41 (patch) | |
| tree | 121125613c745b9f7874959463dc3a34fa50c0e1 /src/cryptonote_protocol/cryptonote_protocol_handler.inl | |
| parent | bb6d2d4b05c90e360ab66121abac5adc8d27d879 (diff) | |
| parent | 5dee031b25dca38d655a024cdc706e463d90e786 (diff) | |
| download | monzero-core-bdaadf85dc34da357fcc0248ae15aa4ea803ea41.tar.gz monzero-core-bdaadf85dc34da357fcc0248ae15aa4ea803ea41.tar.xz monzero-core-bdaadf85dc34da357fcc0248ae15aa4ea803ea41.zip | |
Merge pull request #7117
5dee031b2 protocol: add a sanity check to the number of block hashes sent (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_protocol/cryptonote_protocol_handler.inl')
| -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 a4a433861..efc239202 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); |
