Merge pull request #2397

c6375a14 tx_pool: catch exceptions in LockedTXN dtor (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2017-09-04 17:04:58 +02:00
commit 2f7358ef75
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -92,7 +92,7 @@ namespace cryptonote
LockedTXN(Blockchain &b): m_blockchain(b), m_batch(false) {
m_batch = m_blockchain.get_db().batch_start();
}
~LockedTXN() { if (m_batch) { m_blockchain.get_db().batch_stop(); } }
~LockedTXN() { try { if (m_batch) { m_blockchain.get_db().batch_stop(); } } catch (const std::exception &e) { MWARNING("LockedTXN dtor filtering exception: " << e.what()); } }
private:
Blockchain &m_blockchain;
bool m_batch;