From a2c845c7e3d8a9bfc492cd3efd067f2565a26c79 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 24 Dec 2017 13:04:40 +0000 Subject: cryptonote_protocol: internal error consistency size check --- src/cryptonote_protocol/cryptonote_protocol_handler.inl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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 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::const_iterator it = block_entry.txs.begin(); for (size_t i = 0; i < tvc.size(); ++i, ++it) { -- cgit v1.2.3