Disallow and remove IOUs denominated in XRP.

This commit is contained in:
Arthur Britto
2013-04-09 01:21:26 -07:00
parent b2853161df
commit f2dd80c004
6 changed files with 26 additions and 7 deletions

View File

@@ -248,9 +248,9 @@ TER TrustSetTransactor::doApply()
if (uFlagsIn != uFlagsOut)
sleRippleState->setFieldU32(sfFlags, uFlagsOut);
if (bDefault)
if (bDefault || CURRENCY_BAD == uCurrencyID)
{
// Can delete.
// Delete.
terResult = mEngine->getNodes().trustDelete(sleRippleState, uLowAccountID, uHighAccountID);
}
@@ -285,6 +285,10 @@ TER TrustSetTransactor::doApply()
// Another transaction could create the account and then this transaction would succeed.
terResult = tecNO_LINE_INSUF_RESERVE;
}
else if (CURRENCY_BAD == uCurrencyID)
{
terResult = temBAD_CURRENCY;
}
else
{
STAmount saBalance = STAmount(uCurrencyID, ACCOUNT_ONE); // Zero balance in currency.