mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Revert "Reduce SHAMapTreeNode copying during SHAMap unsharing:"
This reverts commit 47c6ab0ced.
This commit is contained in:
committed by
Vinnie Falco
parent
aaf209485c
commit
52879d964e
@@ -413,7 +413,6 @@ public:
|
||||
}
|
||||
if (didApply)
|
||||
{
|
||||
ledger->setImmutable (); // So the next line doesn't have to copy
|
||||
mCurrentLedger.set (ledger);
|
||||
getApp().getOPs ().pubProposedTransaction (ledger, txn, result);
|
||||
}
|
||||
|
||||
@@ -1068,7 +1068,6 @@ void ApplicationImp::startNewLedger ()
|
||||
firstLedger->updateHash ();
|
||||
firstLedger->setClosed ();
|
||||
firstLedger->setAccepted ();
|
||||
firstLedger->setImmutable();
|
||||
m_ledgerMaster->pushLedger (firstLedger);
|
||||
|
||||
Ledger::pointer secondLedger = std::make_shared<Ledger> (true, std::ref (*firstLedger));
|
||||
|
||||
@@ -278,7 +278,6 @@ void
|
||||
SHAMap::setImmutable ()
|
||||
{
|
||||
assert (state_ != SHAMapState::Invalid);
|
||||
unshare ();
|
||||
state_ = SHAMapState::Immutable;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ SHAMap::snapShot (bool isMutable) const
|
||||
newMap.seq_ = seq_ + 1;
|
||||
newMap.root_ = root_;
|
||||
|
||||
if ((state_ != SHAMapState::Immutable) || isMutable)
|
||||
if ((state_ != SHAMapState::Immutable) || !isMutable)
|
||||
{
|
||||
// If either map may change, they cannot share nodes
|
||||
newMap.unshare ();
|
||||
|
||||
Reference in New Issue
Block a user