mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Delete unfunded offers in predictable order
This commit is contained in:
committed by
Edward Hennis
parent
08e518af73
commit
25f611d0ec
@@ -32,7 +32,7 @@ namespace {
|
|||||||
static
|
static
|
||||||
TER
|
TER
|
||||||
deleteOffers (ApplyView& view,
|
deleteOffers (ApplyView& view,
|
||||||
OfferSet const& offers, beast::Journal j)
|
std::set<uint256> const& offers, beast::Journal j)
|
||||||
{
|
{
|
||||||
for (auto& e: offers)
|
for (auto& e: offers)
|
||||||
if (TER r = offerDelete (view,
|
if (TER r = offerDelete (view,
|
||||||
@@ -201,7 +201,7 @@ TER RippleCalc::rippleCalculate ()
|
|||||||
getRate (saDstAmountReq_, saMaxAmountReq_) : 0;
|
getRate (saDstAmountReq_, saMaxAmountReq_) : 0;
|
||||||
|
|
||||||
// Offers that became unfunded.
|
// Offers that became unfunded.
|
||||||
OfferSet unfundedOffersFromBestPaths;
|
std::set<uint256> unfundedOffersFromBestPaths;
|
||||||
|
|
||||||
int iPass = 0;
|
int iPass = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ public:
|
|||||||
PaymentSandbox& view;
|
PaymentSandbox& view;
|
||||||
|
|
||||||
// If the transaction fails to meet some constraint, still need to delete
|
// 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.
|
// Offers that were found unfunded.
|
||||||
path::OfferSet permanentlyUnfundedOffers_;
|
std::set<uint256> permanentlyUnfundedOffers_;
|
||||||
|
|
||||||
// First time working in reverse a funding source was mentioned. Source may
|
// First time working in reverse a funding source was mentioned. Source may
|
||||||
// only be used there.
|
// only be used there.
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ namespace path {
|
|||||||
|
|
||||||
using NodeIndex = unsigned int;
|
using NodeIndex = unsigned int;
|
||||||
|
|
||||||
using OfferSet = hash_set <uint256>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
using AccountIssueToNodeIndex = hash_map <AccountIssue, path::NodeIndex>;
|
using AccountIssueToNodeIndex = hash_map <AccountIssue, path::NodeIndex>;
|
||||||
|
|||||||
Reference in New Issue
Block a user