aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_db
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_db')
-rw-r--r--src/blockchain_db/blockchain_db.cpp10
-rw-r--r--src/blockchain_db/lmdb/db_lmdb.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp
index 07b2451b0..7e77953c8 100644
--- a/src/blockchain_db/blockchain_db.cpp
+++ b/src/blockchain_db/blockchain_db.cpp
@@ -197,7 +197,7 @@ uint64_t BlockchainDB::add_block( const block& blk
{
// sanity
if (blk.tx_hashes.size() != txs.size())
- throw new std::runtime_error("Inconsistent tx/hashes sizes");
+ throw std::runtime_error("Inconsistent tx/hashes sizes");
block_txn_start(false);
@@ -283,7 +283,7 @@ block BlockchainDB::get_block_from_height(const uint64_t& height) const
blobdata bd = get_block_blob_from_height(height);
block b;
if (!parse_and_validate_block_from_blob(bd, b))
- throw new DB_ERROR("Failed to parse block from blob retrieved from the db");
+ throw DB_ERROR("Failed to parse block from blob retrieved from the db");
return b;
}
@@ -293,7 +293,7 @@ block BlockchainDB::get_block(const crypto::hash& h) const
blobdata bd = get_block_blob(h);
block b;
if (!parse_and_validate_block_from_blob(bd, b))
- throw new DB_ERROR("Failed to parse block from blob retrieved from the db");
+ throw DB_ERROR("Failed to parse block from blob retrieved from the db");
return b;
}
@@ -304,7 +304,7 @@ bool BlockchainDB::get_tx(const crypto::hash& h, cryptonote::transaction &tx) co
if (!get_tx_blob(h, bd))
return false;
if (!parse_and_validate_tx_from_blob(bd, tx))
- throw new DB_ERROR("Failed to parse transaction from blob retrieved from the db");
+ throw DB_ERROR("Failed to parse transaction from blob retrieved from the db");
return true;
}
@@ -313,7 +313,7 @@ transaction BlockchainDB::get_tx(const crypto::hash& h) const
{
transaction tx;
if (!get_tx(h, tx))
- throw new TX_DNE(std::string("tx with hash ").append(epee::string_tools::pod_to_hex(h)).append(" not found in db").c_str());
+ throw TX_DNE(std::string("tx with hash ").append(epee::string_tools::pod_to_hex(h)).append(" not found in db").c_str());
return tx;
}
diff --git a/src/blockchain_db/lmdb/db_lmdb.cpp b/src/blockchain_db/lmdb/db_lmdb.cpp
index 07a0e67b1..ee4368e86 100644
--- a/src/blockchain_db/lmdb/db_lmdb.cpp
+++ b/src/blockchain_db/lmdb/db_lmdb.cpp
@@ -2894,7 +2894,7 @@ uint64_t BlockchainLMDB::add_block(const block& blk, const size_t& block_size, c
{
BlockchainDB::add_block(blk, block_size, cumulative_difficulty, coins_generated, txs);
}
- catch (DB_ERROR_TXN_START& e)
+ catch (const DB_ERROR_TXN_START& e)
{
throw;
}