mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Enforce no-ripple constraints
This commit is contained in:
@@ -799,6 +799,19 @@ TER PathState::checkNoRipple (
|
||||
if (terStatus != tesSUCCESS)
|
||||
return terStatus;
|
||||
}
|
||||
|
||||
if (!nodes_[i - 1].isAccount() &&
|
||||
nodes_[i].isAccount() &&
|
||||
nodes_[i + 1].isAccount() &&
|
||||
nodes_[i -1].issue_.account != nodes_[i].account_)
|
||||
{ // offer -> account -> account
|
||||
auto const& currencyID = nodes_[i].issue_.currency;
|
||||
terStatus = checkNoRipple (
|
||||
nodes_[i-1].issue_.account, nodes_[i].account_, nodes_[i+1].account_,
|
||||
currencyID);
|
||||
if (terStatus != tesSUCCESS)
|
||||
return terStatus;
|
||||
}
|
||||
}
|
||||
|
||||
return tesSUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user