diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 15:08:22 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 15:08:22 +0000 |
commit | 1aabd14c21221702b7efd84dfe43d17f6486db83 (patch) | |
tree | e18b567001e351bd7fae4cf5884a76a75b9c8460 /src/blockchain_db | |
parent | Merge pull request #3198 (diff) | |
download | monero-1aabd14c21221702b7efd84dfe43d17f6486db83.tar.xz |
db_lmdb: check hard fork info drop succeeded
Coverity 136364
Diffstat (limited to 'src/blockchain_db')
-rw-r--r-- | src/blockchain_db/lmdb/db_lmdb.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp index 6b81a4c90..604aae61e 100644 --- a/src/blockchain_db/lmdb/db_lmdb.cpp +++ b/src/blockchain_db/lmdb/db_lmdb.cpp @@ -3140,8 +3140,12 @@ void BlockchainLMDB::drop_hard_fork_info() TXN_PREFIX(0); - mdb_drop(*txn_ptr, m_hf_starting_heights, 1); - mdb_drop(*txn_ptr, m_hf_versions, 1); + auto result = mdb_drop(*txn_ptr, m_hf_starting_heights, 1); + if (result) + throw1(DB_ERROR(lmdb_error("Error dropping hard fork starting heights db: ", result).c_str())); + result = mdb_drop(*txn_ptr, m_hf_versions, 1); + if (result) + throw1(DB_ERROR(lmdb_error("Error dropping hard fork versions db: ", result).c_str())); TXN_POSTFIX_SUCCESS(); } |