tx_pool: catch exceptions in LockedTXN dtor

This might prevent some calls to terminate when the LockedTXN
dtor is called as part of stack unwinding caused by another
exception in the first place.
release-v0.11.0.0
moneromooo-monero 7 years ago
parent 87d332df1a
commit c6375a14af
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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;

Loading…
Cancel
Save