mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-28 06:55:50 +00:00
Detect paths with illegal bridging offers
This commit is contained in:
@@ -356,13 +356,19 @@ TER PathState::pushNode (
|
||||
|
||||
if (!!pnCur.uCurrencyID != !!pnCur.uIssuerID)
|
||||
{
|
||||
WriteLog (lsDEBUG, RippleCalc) << "pushNode: currency is inconsistent with issuer.";
|
||||
|
||||
WriteLog (lsDEBUG, RippleCalc) <<
|
||||
"pushNode: currency is inconsistent with issuer.";
|
||||
terResult = temBAD_PATH;
|
||||
}
|
||||
else if (!!pnPrv.uAccountID)
|
||||
else if (pnPrv.uCurrencyID == pnCur.uCurrencyID &&
|
||||
pnPrv.uIssuerID == pnCur.uIssuerID)
|
||||
{
|
||||
WriteLog (lsDEBUG, RippleCalc) <<
|
||||
"pushNode: bad path: offer to same currency and issuer";
|
||||
terResult = temBAD_PATH;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Previous is an account.
|
||||
WriteLog (lsTRACE, RippleCalc) << "pushNode: imply for offer.";
|
||||
|
||||
// Insert intermediary issuer account if needed.
|
||||
|
||||
Reference in New Issue
Block a user