mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Detect paths with illegal bridging offers
This commit is contained in:
@@ -356,13 +356,19 @@ TER PathState::pushNode (
|
||||
|
||||
if (!!node.uCurrencyID != !!node.uIssuerID)
|
||||
{
|
||||
WriteLog (lsDEBUG, RippleCalc) << "pushNode: currency is inconsistent with issuer.";
|
||||
|
||||
WriteLog (lsDEBUG, RippleCalc) <<
|
||||
"pushNode: currency is inconsistent with issuer.";
|
||||
errorCode = temBAD_PATH;
|
||||
}
|
||||
else if (!!previousNode.uAccountID)
|
||||
else if (previousNode.uCurrencyID == node.uCurrencyID &&
|
||||
previousNode.uIssuerID == node.uIssuerID)
|
||||
{
|
||||
WriteLog (lsDEBUG, RippleCalc) <<
|
||||
"pushNode: bad path: offer to same currency and issuer";
|
||||
errorCode = 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