mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor treatment of Ledger:
All handling of Ledger in shared_ptr is modified to use a const managed object when the context requires immutable semantics.
This commit is contained in:
@@ -241,11 +241,12 @@ SHAMapStoreImp::makeDatabase (std::string const& name,
|
||||
}
|
||||
|
||||
void
|
||||
SHAMapStoreImp::onLedgerClosed (Ledger::pointer validatedLedger)
|
||||
SHAMapStoreImp::onLedgerClosed(
|
||||
std::shared_ptr<Ledger const> const& ledger)
|
||||
{
|
||||
{
|
||||
std::lock_guard <std::mutex> lock (mutex_);
|
||||
newLedger_ = validatedLedger;
|
||||
newLedger_ = ledger;
|
||||
}
|
||||
cond_.notify_one();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user