Ensure offer cleanup is deterministic

This commit is contained in:
JoelKatz
2014-03-11 01:11:45 -07:00
committed by Nik Bougalis
parent cf63b5c859
commit b22a0f4a97
2 changed files with 3 additions and 8 deletions

View File

@@ -360,10 +360,7 @@ TER OfferCreateTransactor::takeOffers (
{
WriteLog (lsDEBUG, OfferCreateTransactor) << "takeOffers: became unfunded: " << uOfferIndex.ToString ();
terResult = lesActive.offerDelete (uOfferIndex);
if (tesSUCCESS != terResult)
break;
lesActive.offerDelete (uOfferIndex);
}
}
@@ -709,10 +706,8 @@ TER OfferCreateTransactor::doApply ()
WriteLog (lsINFO, OfferCreateTransactor) << "takeOffers: found unfunded: " << uOfferIndex.ToString ();
terResult = lesActive.offerDelete (uOfferIndex);
lesActive.offerDelete (uOfferIndex);
if (tesSUCCESS != terResult)
break;
}
// Go through the list of offers not found and remove them from the order book

View File

@@ -54,7 +54,7 @@ private:
boost::unordered_set<uint256> usOfferUnfundedFound; // Offers found unfunded.
typedef std::pair <uint256, uint256> missingOffer_t;
boost::unordered_set<missingOffer_t> usMissingOffers;
std::set<missingOffer_t> usMissingOffers;
};
#endif