diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-01-10 11:54:23 +0100 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-01-10 11:54:23 +0100 |
commit | 0b5994fbec79480cd8aa62ec1e10bc7d7fe63efe (patch) | |
tree | edd06b661a8f72d933cb806dddd217f79b332c60 /src | |
parent | Merge pull request #3002 (diff) | |
parent | cryptonote_protocol: internal error consistency size check (diff) | |
download | monero-0b5994fbec79480cd8aa62ec1e10bc7d7fe63efe.tar.xz |
Merge pull request #3004
a2c845c7 cryptonote_protocol: internal error consistency size check (moneromooo-monero)
Diffstat (limited to 'src')
-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 8aef31a5a..5d25d1058 100644 --- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl +++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl @@ -1059,6 +1059,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) { |