Permalink
Browse files

Allowing InflationDest to be removed.

  • Loading branch information...
marco89nish committed May 2, 2014
1 parent 1b669a8 commit 0d6dc2e70039ab40ea01b99a9c8440e849d1160b
Showing with 17 additions and 6 deletions.
  1. +17 −6 src/ripple_app/transactors/AccountSetTransactor.cpp
@@ -285,14 +285,25 @@ TER AccountSetTransactor::doApply ()
{
RippleAddress aInflationDest = mTxn.getFieldAccount(sfInflationDest);
if (!mEngine->getLedger()->hasAccount(aInflationDest))
{
WriteLog(lsINFO, AccountSetTransactor) << "AccountSet: Inflation destination account doesn't exist.";
if ( !aInflationDest.isSet() ){
WriteLog(lsINFO, AccountSetTransactor) << "AccountSet: Removing inflation destination.";
return temDST_NEEDED;
}
mTxnAccount->makeFieldAbsent(sfInflationDest);
}
else
{
if (!mEngine->getLedger()->hasAccount(aInflationDest))
{
WriteLog(lsINFO, AccountSetTransactor) << "AccountSet: Inflation destination account doesn't exist.";
return temDST_NEEDED;
}
WriteLog(lsINFO, AccountSetTransactor) << "AccountSet: Set inflation destination account.";
mTxnAccount->setFieldAccount(sfInflationDest, aInflationDest);
}
mTxnAccount->setFieldAccount(sfInflationDest, aInflationDest);
}

0 comments on commit 0d6dc2e

Please sign in to comment.