Delete unfunded offers in predictable order

This commit is contained in:
Nik Bougalis
2016-01-19 16:45:20 -08:00
committed by Edward Hennis
parent 08e518af73
commit 25f611d0ec
3 changed files with 4 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ namespace {
static
TER
deleteOffers (ApplyView& view,
OfferSet const& offers, beast::Journal j)
std::set<uint256> const& offers, beast::Journal j)
{
for (auto& e: offers)
if (TER r = offerDelete (view,
@@ -201,7 +201,7 @@ TER RippleCalc::rippleCalculate ()
getRate (saDstAmountReq_, saMaxAmountReq_) : 0;
// Offers that became unfunded.
OfferSet unfundedOffersFromBestPaths;
std::set<uint256> unfundedOffersFromBestPaths;
int iPass = 0;

View File

@@ -106,10 +106,10 @@ public:
PaymentSandbox& view;
// If the transaction fails to meet some constraint, still need to delete
// unfunded offers.
// unfunded offers in a deterministic order (hence the ordered container).
//
// Offers that were found unfunded.
path::OfferSet permanentlyUnfundedOffers_;
std::set<uint256> permanentlyUnfundedOffers_;
// First time working in reverse a funding source was mentioned. Source may
// only be used there.

View File

@@ -30,8 +30,6 @@ namespace path {
using NodeIndex = unsigned int;
using OfferSet = hash_set <uint256>;
}
using AccountIssueToNodeIndex = hash_map <AccountIssue, path::NodeIndex>;