Permalink
Browse files

rpc: sanity check on number of txes in a block

  • Loading branch information...
moneromooo-monero committed Apr 15, 2018
1 parent 6795bd0 commit 209ec963b5ed0a3ad98f159b9f500c28bb3e7d78
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/rpc/core_rpc_server.cpp
@@ -258,6 +258,12 @@ namespace cryptonote
return false;
}
}
if(b.tx_hashes.size() != bd.second.size())
{
MERROR("block " << get_block_hash(b) << ": tx_hashes.size() " << b.tx_hashes.size() << ", bd.second.size() " << bd.second.size());
res.status = "Failed";
return false;
}
size_t txidx = 0;
ntxes += bd.second.size();
for (std::list<cryptonote::blobdata>::iterator i = bd.second.begin(); i != bd.second.end(); ++i)

0 comments on commit 209ec96

Please sign in to comment.