We have to make sure someone holds a strong pointer to the acquiring

set when we move it from acquring to acquired.
This commit is contained in:
JoelKatz
2012-09-14 08:40:55 -07:00
parent 72b2478a7b
commit c9a44e4a1a

View File

@@ -880,7 +880,8 @@ bool LedgerConsensus::peerGaveNodes(Peer::ref peer, const uint256& setHash,
boost::unordered_map<uint256, TransactionAcquire::pointer>::iterator acq = mAcquiring.find(setHash);
if (acq == mAcquiring.end())
return false;
return acq->second->takeNodes(nodeIDs, nodeData, peer);
TransactionAcquire::pointer set = acq->second; // We must keep the set around during the function
return set->takeNodes(nodeIDs, nodeData, peer);
}
void LedgerConsensus::beginAccept()