mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Merge branch 'ripple'
This commit is contained in:
@@ -153,7 +153,7 @@ uint32 TransactionEngine::rippleTransferRate(const uint160& uIssuerID)
|
|||||||
? sleAccount->getIFieldU32(sfTransferRate)
|
? sleAccount->getIFieldU32(sfTransferRate)
|
||||||
: QUALITY_ONE;
|
: QUALITY_ONE;
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("rippleTransferRate: uIssuerID=%s account_exists=%d transfer_rate=%f")
|
Log(lsINFO) << boost::str(boost::format("rippleTransferRate: uIssuerID=%s account_exists=%d transfer_rate=%f")
|
||||||
% NewcoinAddress::createHumanAccountID(uIssuerID)
|
% NewcoinAddress::createHumanAccountID(uIssuerID)
|
||||||
% !!sleAccount
|
% !!sleAccount
|
||||||
% (uQuality/1000000000.0));
|
% (uQuality/1000000000.0));
|
||||||
@@ -189,7 +189,7 @@ uint32 TransactionEngine::rippleQualityIn(const uint160& uToAccountID, const uin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("rippleQualityIn: uToAccountID=%s uFromAccountID=%s uCurrencyID=%s bLine=%d uQualityIn=%f")
|
Log(lsINFO) << boost::str(boost::format("rippleQualityIn: uToAccountID=%s uFromAccountID=%s uCurrencyID=%s bLine=%d uQualityIn=%f")
|
||||||
% NewcoinAddress::createHumanAccountID(uToAccountID)
|
% NewcoinAddress::createHumanAccountID(uToAccountID)
|
||||||
% NewcoinAddress::createHumanAccountID(uFromAccountID)
|
% NewcoinAddress::createHumanAccountID(uFromAccountID)
|
||||||
% STAmount::createHumanCurrency(uCurrencyID)
|
% STAmount::createHumanCurrency(uCurrencyID)
|
||||||
@@ -417,7 +417,7 @@ STAmount TransactionEngine::accountSend(const uint160& uSenderID, const uint160&
|
|||||||
SLE::pointer sleSender = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uSenderID));
|
SLE::pointer sleSender = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uSenderID));
|
||||||
SLE::pointer sleReceiver = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uReceiverID));
|
SLE::pointer sleReceiver = entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uReceiverID));
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("accountSend> %s (%s) -> %s (%s) : %s")
|
Log(lsINFO) << boost::str(boost::format("accountSend> %s (%s) -> %s (%s) : %s")
|
||||||
% NewcoinAddress::createHumanAccountID(uSenderID)
|
% NewcoinAddress::createHumanAccountID(uSenderID)
|
||||||
% (sleSender->getIValueFieldAmount(sfBalance)).getFullText()
|
% (sleSender->getIValueFieldAmount(sfBalance)).getFullText()
|
||||||
% NewcoinAddress::createHumanAccountID(uReceiverID)
|
% NewcoinAddress::createHumanAccountID(uReceiverID)
|
||||||
@@ -427,7 +427,7 @@ STAmount TransactionEngine::accountSend(const uint160& uSenderID, const uint160&
|
|||||||
sleSender->setIFieldAmount(sfBalance, sleSender->getIValueFieldAmount(sfBalance) - saAmount);
|
sleSender->setIFieldAmount(sfBalance, sleSender->getIValueFieldAmount(sfBalance) - saAmount);
|
||||||
sleReceiver->setIFieldAmount(sfBalance, sleReceiver->getIValueFieldAmount(sfBalance) + saAmount);
|
sleReceiver->setIFieldAmount(sfBalance, sleReceiver->getIValueFieldAmount(sfBalance) + saAmount);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("accountSend< %s (%s) -> %s (%s) : %s")
|
Log(lsINFO) << boost::str(boost::format("accountSend< %s (%s) -> %s (%s) : %s")
|
||||||
% NewcoinAddress::createHumanAccountID(uSenderID)
|
% NewcoinAddress::createHumanAccountID(uSenderID)
|
||||||
% (sleSender->getIValueFieldAmount(sfBalance)).getFullText()
|
% (sleSender->getIValueFieldAmount(sfBalance)).getFullText()
|
||||||
% NewcoinAddress::createHumanAccountID(uReceiverID)
|
% NewcoinAddress::createHumanAccountID(uReceiverID)
|
||||||
@@ -1076,7 +1076,7 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
|
|||||||
|
|
||||||
if (!mTxnAccount)
|
if (!mTxnAccount)
|
||||||
{
|
{
|
||||||
Log(lsTRACE) << str(boost::format("applyTransaction: Delay transaction: source account does not exist: %s") %
|
Log(lsTRACE) << boost::str(boost::format("applyTransaction: Delay transaction: source account does not exist: %s") %
|
||||||
txn.getSourceAccount().humanAccountID());
|
txn.getSourceAccount().humanAccountID());
|
||||||
|
|
||||||
terResult = terNO_ACCOUNT;
|
terResult = terNO_ACCOUNT;
|
||||||
@@ -1175,7 +1175,7 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
|
|||||||
else if (saSrcBalance < saPaid)
|
else if (saSrcBalance < saPaid)
|
||||||
{
|
{
|
||||||
Log(lsINFO)
|
Log(lsINFO)
|
||||||
<< str(boost::format("applyTransaction: Delay: insufficent balance: balance=%s paid=%s")
|
<< boost::str(boost::format("applyTransaction: Delay: insufficent balance: balance=%s paid=%s")
|
||||||
% saSrcBalance.getText()
|
% saSrcBalance.getText()
|
||||||
% saPaid.getText());
|
% saPaid.getText());
|
||||||
|
|
||||||
@@ -1930,7 +1930,7 @@ bool TransactionEngine::calcNodeOfferRev(
|
|||||||
const uint256 uDirectEnd = Ledger::getQualityNext(uDirectTip);
|
const uint256 uDirectEnd = Ledger::getQualityNext(uDirectTip);
|
||||||
bool bAdvance = !entryCache(ltDIR_NODE, uDirectTip);
|
bool bAdvance = !entryCache(ltDIR_NODE, uDirectTip);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeOfferRev> uIndex=%d prv=%s/%s cur=%s/%s nxt=%s/%s saTransferRate=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeOfferRev> uIndex=%d prv=%s/%s cur=%s/%s nxt=%s/%s saTransferRate=%s")
|
||||||
% uIndex
|
% uIndex
|
||||||
% STAmount::createHumanCurrency(uPrvCurrencyID)
|
% STAmount::createHumanCurrency(uPrvCurrencyID)
|
||||||
% NewcoinAddress::createHumanAccountID(uPrvIssuerID)
|
% NewcoinAddress::createHumanAccountID(uPrvIssuerID)
|
||||||
@@ -1946,7 +1946,7 @@ bool TransactionEngine::calcNodeOfferRev(
|
|||||||
const STAmount& saCurDlvReq = pnCur.saRevDeliver; // Reverse driver.
|
const STAmount& saCurDlvReq = pnCur.saRevDeliver; // Reverse driver.
|
||||||
STAmount saCurDlvAct;
|
STAmount saCurDlvAct;
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeOfferRev: uDirectTip=%s") % uDirectTip.ToString());
|
Log(lsINFO) << boost::str(boost::format("calcNodeOfferRev: uDirectTip=%s") % uDirectTip.ToString());
|
||||||
|
|
||||||
while (!!uDirectTip // Have a quality.
|
while (!!uDirectTip // Have a quality.
|
||||||
&& saCurDlvAct != saCurDlvReq)
|
&& saCurDlvAct != saCurDlvReq)
|
||||||
@@ -1956,7 +1956,7 @@ bool TransactionEngine::calcNodeOfferRev(
|
|||||||
{
|
{
|
||||||
uDirectTip = mLedger->getNextLedgerIndex(uDirectTip, uDirectEnd);
|
uDirectTip = mLedger->getNextLedgerIndex(uDirectTip, uDirectEnd);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeOfferRev: uDirectTip=%s") % uDirectTip.ToString());
|
Log(lsINFO) << boost::str(boost::format("calcNodeOfferRev: uDirectTip=%s") % uDirectTip.ToString());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1976,7 +1976,7 @@ bool TransactionEngine::calcNodeOfferRev(
|
|||||||
while (saCurDlvReq != saCurDlvAct // Have not met request.
|
while (saCurDlvReq != saCurDlvAct // Have not met request.
|
||||||
&& dirNext(uDirectTip, sleDirectDir, uEntry, uCurIndex))
|
&& dirNext(uDirectTip, sleDirectDir, uEntry, uCurIndex))
|
||||||
{
|
{
|
||||||
Log(lsINFO) << str(boost::format("calcNodeOfferRev: uCurIndex=%s") % uCurIndex.ToString());
|
Log(lsINFO) << boost::str(boost::format("calcNodeOfferRev: uCurIndex=%s") % uCurIndex.ToString());
|
||||||
|
|
||||||
SLE::pointer sleCurOfr = entryCache(ltOFFER, uCurIndex);
|
SLE::pointer sleCurOfr = entryCache(ltOFFER, uCurIndex);
|
||||||
uint160 uCurOfrAccountID = sleCurOfr->getIValueFieldAccount(sfAccount).getAccountID();
|
uint160 uCurOfrAccountID = sleCurOfr->getIValueFieldAccount(sfAccount).getAccountID();
|
||||||
@@ -2101,7 +2101,7 @@ bool TransactionEngine::calcNodeOfferRev(
|
|||||||
bSuccess = true;
|
bSuccess = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeOfferRev< uIndex=%d saPrvDlvReq=%s bSuccess=%d")
|
Log(lsINFO) << boost::str(boost::format("calcNodeOfferRev< uIndex=%d saPrvDlvReq=%s bSuccess=%d")
|
||||||
% uIndex
|
% uIndex
|
||||||
% saPrvDlvReq.getText()
|
% saPrvDlvReq.getText()
|
||||||
% bSuccess);
|
% bSuccess);
|
||||||
@@ -2527,7 +2527,7 @@ void TransactionEngine::calcNodeRipple(
|
|||||||
STAmount& saPrvAct, // <-> in limit including achieved
|
STAmount& saPrvAct, // <-> in limit including achieved
|
||||||
STAmount& saCurAct) // <-> out limit achieved.
|
STAmount& saCurAct) // <-> out limit achieved.
|
||||||
{
|
{
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple> uQualityIn=%d uQualityOut=%d saPrvReq=%s saCurReq=%s saPrvAct=%s saCurAct=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple> uQualityIn=%d uQualityOut=%d saPrvReq=%s saCurReq=%s saPrvAct=%s saCurAct=%s")
|
||||||
% uQualityIn
|
% uQualityIn
|
||||||
% uQualityOut
|
% uQualityOut
|
||||||
% saPrvReq.getFullText()
|
% saPrvReq.getFullText()
|
||||||
@@ -2542,7 +2542,7 @@ void TransactionEngine::calcNodeRipple(
|
|||||||
const STAmount saCur = saCurReq-saCurAct;
|
const STAmount saCur = saCurReq-saCurAct;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple: bPrvUnlimited=%d saPrv=%s saCur=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple: bPrvUnlimited=%d saPrv=%s saCur=%s")
|
||||||
% bPrvUnlimited
|
% bPrvUnlimited
|
||||||
% saPrv.getFullText()
|
% saPrv.getFullText()
|
||||||
% saCur.getFullText());
|
% saCur.getFullText());
|
||||||
@@ -2551,7 +2551,7 @@ void TransactionEngine::calcNodeRipple(
|
|||||||
if (uQualityIn >= uQualityOut)
|
if (uQualityIn >= uQualityOut)
|
||||||
{
|
{
|
||||||
// No fee.
|
// No fee.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple: No fees"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple: No fees"));
|
||||||
|
|
||||||
STAmount saTransfer = bPrvUnlimited ? saCur : MIN(saPrv, saCur);
|
STAmount saTransfer = bPrvUnlimited ? saCur : MIN(saPrv, saCur);
|
||||||
|
|
||||||
@@ -2561,32 +2561,32 @@ void TransactionEngine::calcNodeRipple(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Fee.
|
// Fee.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple: Fee"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple: Fee"));
|
||||||
|
|
||||||
uint160 uCurrencyID = saCur.getCurrency();
|
uint160 uCurrencyID = saCur.getCurrency();
|
||||||
STAmount saCurIn = STAmount::divide(STAmount::multiply(saCur, uQualityOut, uCurrencyID), uQualityIn, uCurrencyID);
|
STAmount saCurIn = STAmount::divide(STAmount::multiply(saCur, uQualityOut, uCurrencyID), uQualityIn, uCurrencyID);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple: bPrvUnlimited=%d saPrv=%s saCurIn=%s") % bPrvUnlimited % saPrv.getFullText() % saCurIn.getFullText());
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple: bPrvUnlimited=%d saPrv=%s saCurIn=%s") % bPrvUnlimited % saPrv.getFullText() % saCurIn.getFullText());
|
||||||
if (bPrvUnlimited || saCurIn <= saPrv)
|
if (bPrvUnlimited || saCurIn <= saPrv)
|
||||||
{
|
{
|
||||||
// All of cur. Some amount of prv.
|
// All of cur. Some amount of prv.
|
||||||
saCurAct += saCur;
|
saCurAct += saCur;
|
||||||
saPrvAct += saCurIn;
|
saPrvAct += saCurIn;
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple:3c: saCurReq=%s saPrvAct=%s") % saCurReq.getFullText() % saPrvAct.getFullText());
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple:3c: saCurReq=%s saPrvAct=%s") % saCurReq.getFullText() % saPrvAct.getFullText());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// A part of cur. All of prv. (cur as driver)
|
// A part of cur. All of prv. (cur as driver)
|
||||||
uint160 uCurrencyID = saPrv.getCurrency();
|
uint160 uCurrencyID = saPrv.getCurrency();
|
||||||
STAmount saCurOut = STAmount::divide(STAmount::multiply(saPrv, uQualityIn, uCurrencyID), uQualityOut, uCurrencyID);
|
STAmount saCurOut = STAmount::divide(STAmount::multiply(saPrv, uQualityIn, uCurrencyID), uQualityOut, uCurrencyID);
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple:4: saCurReq=%s") % saCurReq.getFullText());
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple:4: saCurReq=%s") % saCurReq.getFullText());
|
||||||
|
|
||||||
saCurAct += saCurOut;
|
saCurAct += saCurOut;
|
||||||
saPrvAct = saPrvReq;
|
saPrvAct = saPrvReq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeRipple< uQualityIn=%d uQualityOut=%d saPrvReq=%s saCurReq=%s saPrvAct=%s saCurAct=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeRipple< uQualityIn=%d uQualityOut=%d saPrvReq=%s saCurReq=%s saPrvAct=%s saCurAct=%s")
|
||||||
% uQualityIn
|
% uQualityIn
|
||||||
% uQualityOut
|
% uQualityOut
|
||||||
% saPrvReq.getFullText()
|
% saPrvReq.getFullText()
|
||||||
@@ -2625,7 +2625,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
const STAmount saPrvBalance = uIndex && bPrvAccount ? rippleBalance(uCurAccountID, uPrvAccountID, uCurrencyID) : STAmount(uCurrencyID);
|
const STAmount saPrvBalance = uIndex && bPrvAccount ? rippleBalance(uCurAccountID, uPrvAccountID, uCurrencyID) : STAmount(uCurrencyID);
|
||||||
const STAmount saPrvLimit = uIndex && bPrvAccount ? rippleLimit(uCurAccountID, uPrvAccountID, uCurrencyID) : STAmount(uCurrencyID);
|
const STAmount saPrvLimit = uIndex && bPrvAccount ? rippleLimit(uCurAccountID, uPrvAccountID, uCurrencyID) : STAmount(uCurrencyID);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev> uIndex=%d/%d uPrvAccountID=%s uCurAccountID=%s uNxtAccountID=%s uCurrencyID=%s uQualityIn=%d uQualityOut=%d saPrvBalance=%s saPrvLimit=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev> uIndex=%d/%d uPrvAccountID=%s uCurAccountID=%s uNxtAccountID=%s uCurrencyID=%s uQualityIn=%d uQualityOut=%d saPrvBalance=%s saPrvLimit=%s")
|
||||||
% uIndex
|
% uIndex
|
||||||
% uLast
|
% uLast
|
||||||
% NewcoinAddress::createHumanAccountID(uPrvAccountID)
|
% NewcoinAddress::createHumanAccountID(uPrvAccountID)
|
||||||
@@ -2663,7 +2663,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
// STAmount saPrvDeliverReq = saPrvBalance.isPositive() ? saPrvLimit - saPrvBalance : saPrvLimit;
|
// STAmount saPrvDeliverReq = saPrvBalance.isPositive() ? saPrvLimit - saPrvBalance : saPrvLimit;
|
||||||
STAmount saCurWantedAct(saCurWantedReq.getCurrency());
|
STAmount saCurWantedAct(saCurWantedReq.getCurrency());
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: saPrvRedeemReq=%s/%s saPrvIssueReq=%s/%s saCurWantedReq=%s/%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: saPrvRedeemReq=%s/%s saPrvIssueReq=%s/%s saCurWantedReq=%s/%s")
|
||||||
% saPrvRedeemReq.getText()
|
% saPrvRedeemReq.getText()
|
||||||
% saPrvRedeemReq.getHumanCurrency()
|
% saPrvRedeemReq.getHumanCurrency()
|
||||||
% saPrvIssueReq.getText()
|
% saPrvIssueReq.getText()
|
||||||
@@ -2684,14 +2684,14 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
else if (uIndex == uLast)
|
else if (uIndex == uLast)
|
||||||
{
|
{
|
||||||
// account --> ACCOUNT --> $
|
// account --> ACCOUNT --> $
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: account --> ACCOUNT --> $"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: account --> ACCOUNT --> $"));
|
||||||
|
|
||||||
// Calculate redeem
|
// Calculate redeem
|
||||||
if (bRedeem
|
if (bRedeem
|
||||||
&& saPrvRedeemReq) // Previous has IOUs to redeem.
|
&& saPrvRedeemReq) // Previous has IOUs to redeem.
|
||||||
{
|
{
|
||||||
// Redeem at 1:1
|
// Redeem at 1:1
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Redeem at 1:1"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Redeem at 1:1"));
|
||||||
|
|
||||||
saCurWantedAct = MIN(saPrvRedeemReq, saCurWantedReq);
|
saCurWantedAct = MIN(saPrvRedeemReq, saCurWantedReq);
|
||||||
saPrvRedeemAct = saCurWantedAct;
|
saPrvRedeemAct = saCurWantedAct;
|
||||||
@@ -2703,7 +2703,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
&& saPrvIssueReq) // Will accept IOUs.
|
&& saPrvIssueReq) // Will accept IOUs.
|
||||||
{
|
{
|
||||||
// Rate: quality in : 1.0
|
// Rate: quality in : 1.0
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Rate: quality in : 1.0"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Rate: quality in : 1.0"));
|
||||||
|
|
||||||
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvIssueReq, saCurWantedReq, saPrvIssueAct, saCurWantedAct);
|
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvIssueReq, saCurWantedReq, saPrvIssueAct, saCurWantedAct);
|
||||||
}
|
}
|
||||||
@@ -2726,7 +2726,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
&& saPrvBalance.isNegative()) // Previous has IOUs to redeem.
|
&& saPrvBalance.isNegative()) // Previous has IOUs to redeem.
|
||||||
{
|
{
|
||||||
// Rate : 1.0 : quality out
|
// Rate : 1.0 : quality out
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Rate : 1.0 : quality out"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Rate : 1.0 : quality out"));
|
||||||
|
|
||||||
calcNodeRipple(QUALITY_ONE, uQualityOut, saPrvRedeemReq, saCurRedeemReq, saPrvRedeemAct, saCurRedeemAct);
|
calcNodeRipple(QUALITY_ONE, uQualityOut, saPrvRedeemReq, saCurRedeemReq, saPrvRedeemAct, saCurRedeemAct);
|
||||||
}
|
}
|
||||||
@@ -2739,7 +2739,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
&& saCurIssueReq) // Need some issued.
|
&& saCurIssueReq) // Need some issued.
|
||||||
{
|
{
|
||||||
// Rate : 1.0 : transfer_rate
|
// Rate : 1.0 : transfer_rate
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Rate : 1.0 : transfer_rate"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Rate : 1.0 : transfer_rate"));
|
||||||
|
|
||||||
calcNodeRipple(QUALITY_ONE, rippleTransferRate(uCurAccountID), saPrvRedeemReq, saCurIssueReq, saPrvRedeemAct, saCurIssueAct);
|
calcNodeRipple(QUALITY_ONE, rippleTransferRate(uCurAccountID), saPrvRedeemReq, saCurIssueReq, saPrvRedeemAct, saCurIssueAct);
|
||||||
}
|
}
|
||||||
@@ -2751,7 +2751,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
&& !saPrvBalance.isNegative()) // Previous has no IOUs.
|
&& !saPrvBalance.isNegative()) // Previous has no IOUs.
|
||||||
{
|
{
|
||||||
// Rate: quality in : quality out
|
// Rate: quality in : quality out
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Rate: quality in : quality out"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Rate: quality in : quality out"));
|
||||||
|
|
||||||
calcNodeRipple(uQualityIn, uQualityOut, saPrvIssueReq, saCurRedeemReq, saPrvIssueAct, saCurRedeemAct);
|
calcNodeRipple(uQualityIn, uQualityOut, saPrvIssueReq, saCurRedeemReq, saPrvIssueAct, saCurRedeemAct);
|
||||||
}
|
}
|
||||||
@@ -2764,7 +2764,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
&& saCurIssueReq != saCurIssueAct) // Need some issued.
|
&& saCurIssueReq != saCurIssueAct) // Need some issued.
|
||||||
{
|
{
|
||||||
// Rate: quality in : 1.0
|
// Rate: quality in : 1.0
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: Rate: quality in : 1.0"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: Rate: quality in : 1.0"));
|
||||||
|
|
||||||
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvIssueReq, saCurIssueReq, saPrvIssueAct, saCurIssueAct);
|
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvIssueReq, saCurIssueReq, saPrvIssueAct, saCurIssueAct);
|
||||||
}
|
}
|
||||||
@@ -2775,7 +2775,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
// terResult = tenBAD_AMOUNT;
|
// terResult = tenBAD_AMOUNT;
|
||||||
bSuccess = false;
|
bSuccess = false;
|
||||||
}
|
}
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: ^|account --> ACCOUNT --> account : bPrvRedeem=%d bPrvIssue=%d bRedeem=%d bIssue=%d saCurRedeemReq=%s saCurIssueReq=%s saPrvBalance=%s saCurRedeemAct=%s saCurIssueAct=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: ^|account --> ACCOUNT --> account : bPrvRedeem=%d bPrvIssue=%d bRedeem=%d bIssue=%d saCurRedeemReq=%s saCurIssueReq=%s saPrvBalance=%s saCurRedeemAct=%s saCurIssueAct=%s")
|
||||||
% bPrvRedeem
|
% bPrvRedeem
|
||||||
% bPrvIssue
|
% bPrvIssue
|
||||||
% bRedeem
|
% bRedeem
|
||||||
@@ -2791,7 +2791,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
{
|
{
|
||||||
// account --> ACCOUNT --> offer
|
// account --> ACCOUNT --> offer
|
||||||
// Note: deliver is always issue as ACCOUNT is the issuer for the offer input.
|
// Note: deliver is always issue as ACCOUNT is the issuer for the offer input.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: account --> ACCOUNT --> offer"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: account --> ACCOUNT --> offer"));
|
||||||
|
|
||||||
// redeem -> deliver/issue.
|
// redeem -> deliver/issue.
|
||||||
if (bPrvRedeem
|
if (bPrvRedeem
|
||||||
@@ -2825,7 +2825,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
if (uIndex == uLast)
|
if (uIndex == uLast)
|
||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> $
|
// offer --> ACCOUNT --> $
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> $"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> $"));
|
||||||
|
|
||||||
// Rate: quality in : 1.0
|
// Rate: quality in : 1.0
|
||||||
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvDeliverReq, saCurWantedReq, saPrvDeliverAct, saCurWantedAct);
|
calcNodeRipple(uQualityIn, QUALITY_ONE, saPrvDeliverReq, saCurWantedReq, saPrvDeliverAct, saCurWantedAct);
|
||||||
@@ -2841,7 +2841,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> account
|
// offer --> ACCOUNT --> account
|
||||||
// Note: offer is always deliver/redeeming as account is issuer.
|
// Note: offer is always deliver/redeeming as account is issuer.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> account"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> account"));
|
||||||
|
|
||||||
// deliver -> redeem
|
// deliver -> redeem
|
||||||
if (bRedeem // Allowed to redeem.
|
if (bRedeem // Allowed to redeem.
|
||||||
@@ -2874,7 +2874,7 @@ bool TransactionEngine::calcNodeAccountRev(unsigned int uIndex, PathState::point
|
|||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> offer
|
// offer --> ACCOUNT --> offer
|
||||||
// deliver/redeem -> deliver/issue.
|
// deliver/redeem -> deliver/issue.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> offer"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountRev: offer --> ACCOUNT --> offer"));
|
||||||
|
|
||||||
if (bIssue // Allowed to issue.
|
if (bIssue // Allowed to issue.
|
||||||
&& saCurDeliverReq != saCurDeliverAct) // Can only if issue if more can not be redeemed.
|
&& saCurDeliverReq != saCurDeliverAct) // Can only if issue if more can not be redeemed.
|
||||||
@@ -2947,7 +2947,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
|
|
||||||
STAmount& saCurReceive = pspCur->saOutAct;
|
STAmount& saCurReceive = pspCur->saOutAct;
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd> uIndex=%d/%d saCurRedeemReq=%s/%s saCurIssueReq=%s/%s saCurDeliverReq=%s/%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd> uIndex=%d/%d saCurRedeemReq=%s/%s saCurIssueReq=%s/%s saCurDeliverReq=%s/%s")
|
||||||
% uIndex
|
% uIndex
|
||||||
% uLast
|
% uLast
|
||||||
% saCurRedeemReq.getText()
|
% saCurRedeemReq.getText()
|
||||||
@@ -3003,7 +3003,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
}
|
}
|
||||||
saCurSendMaxAct += saCurIssueAct;
|
saCurSendMaxAct += saCurIssueAct;
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: ^ --> ACCOUNT --> account : saCurSendMaxReq=%s saCurRedeemAct=%s saCurIssueReq=%s saCurIssueAct=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: ^ --> ACCOUNT --> account : saCurSendMaxReq=%s saCurRedeemAct=%s saCurIssueReq=%s saCurIssueAct=%s")
|
||||||
% saCurSendMaxReq.getFullText()
|
% saCurSendMaxReq.getFullText()
|
||||||
% saCurRedeemAct.getFullText()
|
% saCurRedeemAct.getFullText()
|
||||||
% saCurIssueReq.getFullText()
|
% saCurIssueReq.getFullText()
|
||||||
@@ -3012,7 +3012,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
else if (uIndex == uLast)
|
else if (uIndex == uLast)
|
||||||
{
|
{
|
||||||
// account --> ACCOUNT --> $
|
// account --> ACCOUNT --> $
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> $ : uPrvAccountID=%s uCurAccountID=%s saPrvRedeemReq=%s saPrvIssueReq=%s")
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> $ : uPrvAccountID=%s uCurAccountID=%s saPrvRedeemReq=%s saPrvIssueReq=%s")
|
||||||
% NewcoinAddress::createHumanAccountID(uPrvAccountID)
|
% NewcoinAddress::createHumanAccountID(uPrvAccountID)
|
||||||
% NewcoinAddress::createHumanAccountID(uCurAccountID)
|
% NewcoinAddress::createHumanAccountID(uCurAccountID)
|
||||||
% saPrvRedeemReq.getFullText()
|
% saPrvRedeemReq.getFullText()
|
||||||
@@ -3033,7 +3033,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// account --> ACCOUNT --> account
|
// account --> ACCOUNT --> account
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> account"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> account"));
|
||||||
|
|
||||||
// Previous redeem part 1: redeem -> redeem
|
// Previous redeem part 1: redeem -> redeem
|
||||||
if (bRedeem // Can redeem.
|
if (bRedeem // Can redeem.
|
||||||
@@ -3080,7 +3080,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
else if (bPrvAccount && !bNxtAccount)
|
else if (bPrvAccount && !bNxtAccount)
|
||||||
{
|
{
|
||||||
// account --> ACCOUNT --> offer
|
// account --> ACCOUNT --> offer
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> offer"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: account --> ACCOUNT --> offer"));
|
||||||
|
|
||||||
// redeem -> issue.
|
// redeem -> issue.
|
||||||
// wants to redeem and current would and can issue.
|
// wants to redeem and current would and can issue.
|
||||||
@@ -3108,7 +3108,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
if (uIndex == uLast)
|
if (uIndex == uLast)
|
||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> $
|
// offer --> ACCOUNT --> $
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> $"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> $"));
|
||||||
|
|
||||||
// Amount to credit.
|
// Amount to credit.
|
||||||
saCurReceive = saPrvDeliverAct;
|
saCurReceive = saPrvDeliverAct;
|
||||||
@@ -3118,7 +3118,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> account
|
// offer --> ACCOUNT --> account
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> account"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> account"));
|
||||||
|
|
||||||
// deliver -> redeem
|
// deliver -> redeem
|
||||||
if (bRedeem // Allowed to redeem.
|
if (bRedeem // Allowed to redeem.
|
||||||
@@ -3146,7 +3146,7 @@ bool TransactionEngine::calcNodeAccountFwd(unsigned int uIndex, PathState::point
|
|||||||
{
|
{
|
||||||
// offer --> ACCOUNT --> offer
|
// offer --> ACCOUNT --> offer
|
||||||
// deliver/redeem -> deliver/issue.
|
// deliver/redeem -> deliver/issue.
|
||||||
Log(lsINFO) << str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> offer"));
|
Log(lsINFO) << boost::str(boost::format("calcNodeAccountFwd: offer --> ACCOUNT --> offer"));
|
||||||
|
|
||||||
if (bIssue // Allowed to issue.
|
if (bIssue // Allowed to issue.
|
||||||
&& saPrvDeliverReq // Previous wants to deliver
|
&& saPrvDeliverReq // Previous wants to deliver
|
||||||
@@ -3390,22 +3390,22 @@ bool PathState::pushNode(int iType, uint160 uAccountID, uint160 uCurrencyID, uin
|
|||||||
|
|
||||||
// XXX Disallow loops in ripple paths
|
// XXX Disallow loops in ripple paths
|
||||||
PathState::PathState(
|
PathState::PathState(
|
||||||
Ledger::pointer lpLedger,
|
const Ledger::pointer& lpLedger,
|
||||||
int iIndex,
|
const int iIndex,
|
||||||
const LedgerEntrySet& lesSource,
|
const LedgerEntrySet& lesSource,
|
||||||
const STPath& spSourcePath,
|
const STPath& spSourcePath,
|
||||||
uint160 uReceiverID,
|
const uint160& uReceiverID,
|
||||||
uint160 uSenderID,
|
const uint160& uSenderID,
|
||||||
STAmount saSend,
|
const STAmount& saSend,
|
||||||
STAmount saSendMax,
|
const STAmount& saSendMax,
|
||||||
bool bPartialPayment
|
const bool bPartialPayment
|
||||||
)
|
)
|
||||||
: mLedger(lpLedger), mIndex(iIndex), uQuality(0)
|
: mLedger(lpLedger), mIndex(iIndex), uQuality(0)
|
||||||
{
|
{
|
||||||
const uint160 uInCurrencyID = saSendMax.getCurrency();
|
const uint160 uInCurrencyID = saSendMax.getCurrency();
|
||||||
const uint160 uOutCurrencyID = saSend.getCurrency();
|
const uint160 uOutCurrencyID = saSend.getCurrency();
|
||||||
const uint160 uInIssuerID = !!uInCurrencyID ? uSenderID : ACCOUNT_XNS;
|
const uint160 uInIssuerID = !!uInCurrencyID ? saSendMax.getIssuer() : ACCOUNT_XNS;
|
||||||
const uint160 uOutIssuerID = !!uOutCurrencyID ? uReceiverID : ACCOUNT_XNS;
|
const uint160 uOutIssuerID = !!uOutCurrencyID ? saSend.getIssuer() : ACCOUNT_XNS;
|
||||||
|
|
||||||
lesEntries = lesSource.duplicate();
|
lesEntries = lesSource.duplicate();
|
||||||
|
|
||||||
@@ -3448,7 +3448,7 @@ PathState::PathState(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("PathState: in=%s/%s out=%s/%s %s")
|
Log(lsINFO) << boost::str(boost::format("PathState: in=%s/%s out=%s/%s %s")
|
||||||
% STAmount::createHumanCurrency(uInCurrencyID)
|
% STAmount::createHumanCurrency(uInCurrencyID)
|
||||||
% NewcoinAddress::createHumanAccountID(uInIssuerID)
|
% NewcoinAddress::createHumanAccountID(uInIssuerID)
|
||||||
% STAmount::createHumanCurrency(uOutCurrencyID)
|
% STAmount::createHumanCurrency(uOutCurrencyID)
|
||||||
@@ -3546,7 +3546,7 @@ bool TransactionEngine::calcNode(unsigned int uIndex, PathState::pointer pspCur,
|
|||||||
const bool bCurAccount = !!(pnCur.uFlags & STPathElement::typeAccount);
|
const bool bCurAccount = !!(pnCur.uFlags & STPathElement::typeAccount);
|
||||||
bool bValid;
|
bool bValid;
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNode> uIndex=%d") % uIndex);
|
Log(lsINFO) << boost::str(boost::format("calcNode> uIndex=%d") % uIndex);
|
||||||
|
|
||||||
// Do current node reverse.
|
// Do current node reverse.
|
||||||
bValid = bCurAccount
|
bValid = bCurAccount
|
||||||
@@ -3567,7 +3567,7 @@ bool TransactionEngine::calcNode(unsigned int uIndex, PathState::pointer pspCur,
|
|||||||
: calcNodeOfferFwd(uIndex, pspCur, bMultiQuality);
|
: calcNodeOfferFwd(uIndex, pspCur, bMultiQuality);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("calcNode< uIndex=%d bValid=%d") % uIndex % bValid);
|
Log(lsINFO) << boost::str(boost::format("calcNode< uIndex=%d bValid=%d") % uIndex % bValid);
|
||||||
|
|
||||||
return bValid;
|
return bValid;
|
||||||
}
|
}
|
||||||
@@ -3616,6 +3616,10 @@ TransactionEngineResult TransactionEngine::doPayment(const SerializedTransaction
|
|||||||
const uint160 uSrcCurrency = saMaxAmount.getCurrency();
|
const uint160 uSrcCurrency = saMaxAmount.getCurrency();
|
||||||
const uint160 uDstCurrency = saDstAmount.getCurrency();
|
const uint160 uDstCurrency = saDstAmount.getCurrency();
|
||||||
|
|
||||||
|
Log(lsINFO) << boost::str(boost::format("doPayment> saMaxAmount=%s saDstAmount=%s")
|
||||||
|
% saMaxAmount.getFullText()
|
||||||
|
% saDstAmount.getFullText());
|
||||||
|
|
||||||
if (!uDstAccountID)
|
if (!uDstAccountID)
|
||||||
{
|
{
|
||||||
Log(lsINFO) << "doPayment: Invalid transaction: Payment destination account not specifed.";
|
Log(lsINFO) << "doPayment: Invalid transaction: Payment destination account not specifed.";
|
||||||
@@ -3907,7 +3911,7 @@ TransactionEngineResult TransactionEngine::doPayment(const SerializedTransaction
|
|||||||
|
|
||||||
if (transResultInfo(terResult, strToken, strHuman))
|
if (transResultInfo(terResult, strToken, strHuman))
|
||||||
{
|
{
|
||||||
Log(lsINFO) << str(boost::format("doPayment: %s: %s") % strToken % strHuman);
|
Log(lsINFO) << boost::str(boost::format("doPayment: %s: %s") % strToken % strHuman);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -3949,7 +3953,7 @@ TransactionEngineResult TransactionEngine::doWalletAdd(const SerializedTransacti
|
|||||||
if (saSrcBalance < saAmount)
|
if (saSrcBalance < saAmount)
|
||||||
{
|
{
|
||||||
std::cerr
|
std::cerr
|
||||||
<< str(boost::format("WalletAdd: Delay transaction: insufficent balance: balance=%s amount=%s")
|
<< boost::str(boost::format("WalletAdd: Delay transaction: insufficent balance: balance=%s amount=%s")
|
||||||
% saSrcBalance.getText()
|
% saSrcBalance.getText()
|
||||||
% saAmount.getText())
|
% saAmount.getText())
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@@ -4264,7 +4268,7 @@ Log(lsWARNING) << "doOfferCreate: saTakerGets=" << saTakerGets.getFullText();
|
|||||||
STAmount saOfferGot;
|
STAmount saOfferGot;
|
||||||
const uint256 uTakeBookBase = Ledger::getBookBase(uGetsCurrency, uGetsIssuerID, uPaysCurrency, uPaysIssuerID);
|
const uint256 uTakeBookBase = Ledger::getBookBase(uGetsCurrency, uGetsIssuerID, uPaysCurrency, uPaysIssuerID);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("doOfferCreate: take against book: %s : %s/%s -> %s/%s")
|
Log(lsINFO) << boost::str(boost::format("doOfferCreate: take against book: %s : %s/%s -> %s/%s")
|
||||||
% uTakeBookBase.ToString()
|
% uTakeBookBase.ToString()
|
||||||
% saTakerGets.getHumanCurrency()
|
% saTakerGets.getHumanCurrency()
|
||||||
% NewcoinAddress::createHumanAccountID(saTakerGets.getIssuer())
|
% NewcoinAddress::createHumanAccountID(saTakerGets.getIssuer())
|
||||||
@@ -4319,7 +4323,7 @@ Log(lsWARNING) << "doOfferCreate: saTakerGets=" << saTakerGets.getFullText();
|
|||||||
{
|
{
|
||||||
uint256 uBookBase = Ledger::getBookBase(uPaysCurrency, uPaysIssuerID, uGetsCurrency, uGetsIssuerID);
|
uint256 uBookBase = Ledger::getBookBase(uPaysCurrency, uPaysIssuerID, uGetsCurrency, uGetsIssuerID);
|
||||||
|
|
||||||
Log(lsINFO) << str(boost::format("doOfferCreate: adding to book: %s : %s/%s -> %s/%s")
|
Log(lsINFO) << boost::str(boost::format("doOfferCreate: adding to book: %s : %s/%s -> %s/%s")
|
||||||
% uBookBase.ToString()
|
% uBookBase.ToString()
|
||||||
% saTakerPays.getHumanCurrency()
|
% saTakerPays.getHumanCurrency()
|
||||||
% NewcoinAddress::createHumanAccountID(saTakerPays.getIssuer())
|
% NewcoinAddress::createHumanAccountID(saTakerPays.getIssuer())
|
||||||
|
|||||||
@@ -145,29 +145,29 @@ public:
|
|||||||
STAmount saOutAct; // Amount actually sent (calc output).
|
STAmount saOutAct; // Amount actually sent (calc output).
|
||||||
|
|
||||||
PathState(
|
PathState(
|
||||||
Ledger::pointer lpLedger,
|
const Ledger::pointer& lpLedger,
|
||||||
int iIndex,
|
const int iIndex,
|
||||||
const LedgerEntrySet& lesSource,
|
const LedgerEntrySet& lesSource,
|
||||||
const STPath& spSourcePath,
|
const STPath& spSourcePath,
|
||||||
uint160 uReceiverID,
|
const uint160& uReceiverID,
|
||||||
uint160 uSenderID,
|
const uint160& uSenderID,
|
||||||
STAmount saSend,
|
const STAmount& saSend,
|
||||||
STAmount saSendMax,
|
const STAmount& saSendMax,
|
||||||
bool bPartialPayment
|
const bool bPartialPayment
|
||||||
);
|
);
|
||||||
|
|
||||||
Json::Value getJson() const;
|
Json::Value getJson() const;
|
||||||
|
|
||||||
static PathState::pointer createPathState(
|
static PathState::pointer createPathState(
|
||||||
Ledger::pointer lpLedger,
|
const Ledger::pointer& lpLedger,
|
||||||
int iIndex,
|
const int iIndex,
|
||||||
const LedgerEntrySet& lesSource,
|
const LedgerEntrySet& lesSource,
|
||||||
const STPath& spSourcePath,
|
const STPath& spSourcePath,
|
||||||
uint160 uReceiverID,
|
const uint160& uReceiverID,
|
||||||
uint160 uSenderID,
|
const uint160& uSenderID,
|
||||||
STAmount saSend,
|
const STAmount& saSend,
|
||||||
STAmount saSendMax,
|
const STAmount& saSendMax,
|
||||||
bool bPartialPayment
|
const bool bPartialPayment
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
PathState::pointer pspNew = boost::make_shared<PathState>(lpLedger, iIndex, lesSource, spSourcePath, uReceiverID, uSenderID, saSend, saSendMax, bPartialPayment);
|
PathState::pointer pspNew = boost::make_shared<PathState>(lpLedger, iIndex, lesSource, spSourcePath, uReceiverID, uSenderID, saSend, saSendMax, bPartialPayment);
|
||||||
|
|||||||
Reference in New Issue
Block a user