|
|
|
@ -2232,10 +2232,21 @@ void BlockchainLMDB::block_txn_abort()
|
|
|
|
|
{
|
|
|
|
|
LOG_PRINT_L3("BlockchainLMDB::" << __func__);
|
|
|
|
|
if (! m_batch_active)
|
|
|
|
|
{
|
|
|
|
|
if (m_write_txn != nullptr)
|
|
|
|
|
{
|
|
|
|
|
delete m_write_txn;
|
|
|
|
|
m_write_txn = nullptr;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// This would probably mean an earlier exception was caught, but then we
|
|
|
|
|
// proceeded further than we should have.
|
|
|
|
|
throw0(DB_ERROR((std::string("BlockchainLMDB::") + __func__ +
|
|
|
|
|
std::string(": block-level DB transaction abort called when write txn doesn't exist")
|
|
|
|
|
).c_str()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint64_t BlockchainLMDB::add_block(const block& blk, const size_t& block_size, const difficulty_type& cumulative_difficulty, const uint64_t& coins_generated,
|
|
|
|
|