Fix the bug that crashed ec2. Must hold a TransactionAcquire::pointer

to call a function that calls erase.
This commit is contained in:
JoelKatz
2013-02-28 19:41:03 -08:00
parent 5e78d19f7a
commit 85cd5bc47f

View File

@@ -1044,7 +1044,10 @@ bool LedgerConsensus::peerHasSet(Peer::ref peer, const uint256& hashSet, ripple:
set.push_back(peer);
boost::unordered_map<uint256, TransactionAcquire::pointer>::iterator acq = mAcquiring.find(hashSet);
if (acq != mAcquiring.end())
acq->second->peerHas(peer);
{
TransactionAcquire::pointer ta = acq->second; // make sure it doesn't go away
ta->peerHas(peer);
}
return true;
}