Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Commit

Permalink
Allowing InflationDest to be removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
marco89nish committed May 2, 2014
1 parent 1b669a8 commit 0d6dc2e
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/ripple_app/transactors/AccountSetTransactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit 0d6dc2e

Please sign in to comment.