mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
Merge pull request #2840
f9fad186
blockchain_db: sanity check on tx/hash vector sizes (flozilla)
This commit is contained in:
commit
57ac2c2642
1 changed files with 4 additions and 0 deletions
|
@ -194,6 +194,10 @@ uint64_t BlockchainDB::add_block( const block& blk
|
|||
, const std::vector<transaction>& txs
|
||||
)
|
||||
{
|
||||
// sanity
|
||||
if (blk.tx_hashes.size() != txs.size())
|
||||
throw new std::runtime_error("Inconsistent tx/hashes sizes");
|
||||
|
||||
block_txn_start(false);
|
||||
|
||||
TIME_MEASURE_START(time1);
|
||||
|
|
Loading…
Reference in a new issue