diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-24 13:04:40 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-24 13:04:40 +0000 |
commit | a2c845c7e3d8a9bfc492cd3efd067f2565a26c79 (patch) | |
tree | b90dc5aa55c83690f42a034d1b0171a17c7f128e | |
parent | Merge pull request #2961 (diff) | |
download | monero-a2c845c7e3d8a9bfc492cd3efd067f2565a26c79.tar.xz |
cryptonote_protocol: internal error consistency size check
-rw-r--r-- | src/cryptonote_protocol/cryptonote_protocol_handler.inl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl index 389e8ba84..e4626a175 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1050,6 +1050,11 @@ skip: num_txs += block_entry.txs.size(); std::vector<tx_verification_context> tvc; m_core.handle_incoming_txs(block_entry.txs, tvc, true, true, false); + if (tvc.size() != block_entry.txs.size()) + { + LOG_ERROR_CCONTEXT("Internal error: tvc.size() != block_entry.txs.size()"); + return true; + } std::list<blobdata>::const_iterator it = block_entry.txs.begin(); for (size_t i = 0; i < tvc.size(); ++i, ++it) { |