mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 22:45:52 +00:00
SHAMap improvements:
* Run key SHAMap unit tests on both backed and unbacked maps * Remove obsolete version of SHAMapTree::addRootNode * Our position maps should be unbacked and immutable * Minimize hash operations for unbacked SHAMaps Not setting the sequence numbers to zero in SHAMap::walkSubTree causes extra hashes to be performed on subsequent operations
This commit is contained in:
@@ -1386,6 +1386,7 @@ void LedgerConsensusImp::takeInitialPosition (
|
||||
{
|
||||
std::shared_ptr<SHAMap> initialSet = std::make_shared <SHAMap> (
|
||||
SHAMapType::TRANSACTION, app_.family());
|
||||
initialSet->setUnbacked ();
|
||||
|
||||
// Build SHAMap containing all transactions in our open ledger
|
||||
for (auto const& tx : initialLedger->txs)
|
||||
@@ -1629,6 +1630,8 @@ void LedgerConsensusImp::updateOurPositions ()
|
||||
|
||||
if (changes)
|
||||
{
|
||||
ourPosition = ourPosition->snapShot (false);
|
||||
|
||||
auto newHash = ourPosition->getHash ().as_uint256();
|
||||
JLOG (j_.info)
|
||||
<< "Position change: CTime "
|
||||
|
||||
Reference in New Issue
Block a user