Merge pull request #3004

a2c845c7 cryptonote_protocol: internal error consistency size check (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-01-10 11:54:23 +01:00
commit 0b5994fbec
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD
1 changed files with 5 additions and 0 deletions

View File

@ -1059,6 +1059,11 @@ skip:
num_txs += block_entry.txs.size(); num_txs += block_entry.txs.size();
std::vector<tx_verification_context> tvc; std::vector<tx_verification_context> tvc;
m_core.handle_incoming_txs(block_entry.txs, tvc, true, true, false); 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(); std::list<blobdata>::const_iterator it = block_entry.txs.begin();
for (size_t i = 0; i < tvc.size(); ++i, ++it) for (size_t i = 0; i < tvc.size(); ++i, ++it)
{ {