This commit is contained in:
jed
2012-11-20 08:22:53 -08:00
parent 280f832c14
commit 9d83ce6bf2
2 changed files with 11 additions and 8 deletions

View File

@@ -4,13 +4,15 @@
#define RIPPLE_PATHS_MAX 3
// TODO: only have the higher fee if the account doesn't in fact exist
// only have the higher fee if the account doesn't in fact exist
void PaymentTransactor::calculateFee()
{
if (mTxn.getFlags() & tfCreateAccount)
{
mFeeDue = theConfig.FEE_ACCOUNT_CREATE;
const uint160 uDstAccountID = mTxn.getFieldAccount160(sfDestination);
SLE::pointer sleDst = mEngine->entryCache(ltACCOUNT_ROOT, Ledger::getAccountRootIndex(uDstAccountID));
if(!sleDst) mFeeDue = theConfig.FEE_ACCOUNT_CREATE;
else Transactor::calculateFee();
}else Transactor::calculateFee();
}