mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rule out the SHAMap snapShot code as the cause of the duplicate Txn bug.
Add unit test for the SHAMap snapShot code. Add some extra asserts for attempts to modify immutable maps.
This commit is contained in:
@@ -182,7 +182,7 @@ void LedgerConsensus::takeInitialPosition(Ledger::pointer initialLedger)
|
||||
CKey::pointer nodePrivKey = boost::make_shared<CKey>();
|
||||
nodePrivKey->MakeNewKey(); // FIXME
|
||||
|
||||
SHAMap::pointer initialSet = initialLedger->peekTransactionMap()->snapShot();
|
||||
SHAMap::pointer initialSet = initialLedger->peekTransactionMap()->snapShot(false);
|
||||
uint256 txSet = initialSet->getHash();
|
||||
mOurPosition = boost::make_shared<LedgerProposal>(nodePrivKey, initialLedger->getParentHash(), txSet);
|
||||
mapComplete(txSet, initialSet);
|
||||
@@ -377,7 +377,7 @@ bool LedgerConsensus::updateOurPositions(int sinceClose)
|
||||
{
|
||||
if (!changes)
|
||||
{
|
||||
ourPosition = mComplete[mOurPosition->getCurrentHash()]->snapShot();
|
||||
ourPosition = mComplete[mOurPosition->getCurrentHash()]->snapShot(true);
|
||||
changes = true;
|
||||
stable = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user