diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:23:36 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-12-02 09:23:36 +0200 |
commit | 57ac2c264248d2eb7e92b1470bbe93627ee100de (patch) | |
tree | da533e6886585b1737108a11addfb9578accc459 /src | |
parent | Merge pull request #2838 (diff) | |
parent | blockchain_db: sanity check on tx/hash vector sizes (diff) | |
download | monero-57ac2c264248d2eb7e92b1470bbe93627ee100de.tar.xz |
Merge pull request #2840
f9fad186 blockchain_db: sanity check on tx/hash vector sizes (flozilla)
Diffstat (limited to 'src')
-rw-r--r-- | src/blockchain_db/blockchain_db.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index c3f6e3d87..2fb43a4ba 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -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); |