mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 21:48:53 +00:00
blockchain_db: initialize m_open in base class ctor
It's cleaner this way, since it's a base class field Coverity 136568
This commit is contained in:
parent
bece67f9e8
commit
ad11db9144
@ -770,13 +770,13 @@ BlockchainBDB::~BlockchainBDB()
|
||||
}
|
||||
|
||||
BlockchainBDB::BlockchainBDB(bool batch_transactions) :
|
||||
BlockchainDB(),
|
||||
m_buffer(DB_BUFFER_COUNT, DB_BUFFER_LENGTH)
|
||||
{
|
||||
LOG_PRINT_L3("BlockchainBDB::" << __func__);
|
||||
// initialize folder to something "safe" just in case
|
||||
// someone accidentally misuses this class...
|
||||
m_folder = "thishsouldnotexistbecauseitisgibberish";
|
||||
m_open = false;
|
||||
m_run_checkpoint = 0;
|
||||
m_batch_transactions = batch_transactions;
|
||||
m_write_txn = nullptr;
|
||||
|
@ -537,6 +537,11 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* @brief An empty constructor.
|
||||
*/
|
||||
BlockchainDB(): m_open(false) { }
|
||||
|
||||
/**
|
||||
* @brief An empty destructor.
|
||||
*/
|
||||
|
@ -1074,13 +1074,12 @@ BlockchainLMDB::~BlockchainLMDB()
|
||||
close();
|
||||
}
|
||||
|
||||
BlockchainLMDB::BlockchainLMDB(bool batch_transactions)
|
||||
BlockchainLMDB::BlockchainLMDB(bool batch_transactions): BlockchainDB()
|
||||
{
|
||||
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
||||
// initialize folder to something "safe" just in case
|
||||
// someone accidentally misuses this class...
|
||||
m_folder = "thishsouldnotexistbecauseitisgibberish";
|
||||
m_open = false;
|
||||
|
||||
m_batch_transactions = batch_transactions;
|
||||
m_write_txn = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user