mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add a new algorithm for finding the liquidity in a payment path. There is still a reverse and forward pass, but the forward pass starts at the limiting step rather than the payment source. This insures the limiting step is completely consumed rather than potentially leaving a 'dust' amount in the forward pass. Each step in a payment is either a book step, a direct step (account to account step), or an xrp endpoint. Each step in the existing implementation is a triple, where each element in the triple is either an account of a book, for a total of eight step types. Since accounts are considered in pairs, rather than triples, transfer fees are handled differently. In V1 of payments, in the payment path A -> gw ->B, if A redeems to gw, and gw issues to B, a transfer fee is changed. In the new code, a transfer fee is changed even if A issues to gw.
41 lines
1.9 KiB
C++
41 lines
1.9 KiB
C++
//------------------------------------------------------------------------------
|
|
/*
|
|
This file is part of rippled: https://github.com/ripple/rippled
|
|
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
//==============================================================================
|
|
|
|
#include <BeastConfig.h>
|
|
|
|
#include <ripple/app/tests/AccountTxPaging.test.cpp>
|
|
#include <ripple/app/tests/AmendmentTable.test.cpp>
|
|
#include <ripple/app/tests/CrossingLimits_test.cpp>
|
|
#include <ripple/app/tests/DeliverMin.test.cpp>
|
|
#include <ripple/app/tests/Flow_test.cpp>
|
|
#include <ripple/app/tests/HashRouter_test.cpp>
|
|
#include <ripple/app/tests/MultiSign.test.cpp>
|
|
#include <ripple/app/tests/OfferStream.test.cpp>
|
|
#include <ripple/app/tests/Offer.test.cpp>
|
|
#include <ripple/app/tests/Path_test.cpp>
|
|
#include <ripple/app/tests/Regression_test.cpp>
|
|
#include <ripple/app/tests/SHAMapStore_test.cpp>
|
|
#include <ripple/app/tests/SusPay_test.cpp>
|
|
#include <ripple/app/tests/SetAuth_test.cpp>
|
|
#include <ripple/app/tests/OversizeMeta_test.cpp>
|
|
#include <ripple/app/tests/Taker.test.cpp>
|
|
#include <ripple/app/tests/Transaction_ordering_test.cpp>
|
|
#include <ripple/app/tests/TxQ_test.cpp>
|
|
#include <ripple/app/tests/ValidatorList_test.cpp>
|