mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-08 11:16:51 +00:00
Simplify locking and move a typedef.
* Make DatabaseCon's lock private and expose a scoped lock_guard. * Get rid of DeprecatedRecursiveMutex and DeprecatedScopedLock entirely. * Move CancelCallback to Job where it logically belongs.
This commit is contained in:
committed by
Vinnie Falco
parent
02c2029ac1
commit
6335e34395
@@ -117,7 +117,7 @@ AmendmentTableImpl::getCreate (uint256 const& amendmentHash, bool create)
|
||||
query.append (to_string (amendmentHash));
|
||||
query.append ("';");
|
||||
|
||||
DeprecatedScopedLock sl (getApp().getWalletDB ()->getDBLock ());
|
||||
auto sl (getApp().getWalletDB ()->lock ());
|
||||
Database* db = getApp().getWalletDB ()->getDB ();
|
||||
|
||||
if (db->executeSQL (query) && db->startIterRows ())
|
||||
@@ -373,7 +373,7 @@ AmendmentTableImpl::reportValidations (const AmendmentSet& set)
|
||||
|
||||
if (!changedAmendments.empty())
|
||||
{
|
||||
DeprecatedScopedLock sl (getApp().getWalletDB ()->getDBLock ());
|
||||
auto sl (getApp().getWalletDB ()->lock ());
|
||||
Database* db = getApp().getWalletDB ()->getDB ();
|
||||
|
||||
db->executeSQL ("BEGIN TRANSACTION;");
|
||||
|
||||
Reference in New Issue
Block a user