Fix bug in regular key set transactions.

This commit is contained in:
JoelKatz
2013-06-19 10:52:21 -07:00
parent f502126cd7
commit 3b82018037
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,8 @@ SETUP_LOG (RegularKeySetTransactor)
uint64 RegularKeySetTransactor::calculateBaseFee ()
{
if ( ! (mTxnAccount->getFlags () & lsfPasswordSpent)
if ( mTxnAccount
&& (! (mTxnAccount->getFlags () & lsfPasswordSpent))
&& (mSigningPubKey.getAccountID () == mTxnAccountID))
{
// flag is armed and they signed with the right account

View File

@@ -200,11 +200,10 @@ TER Transactor::apply ()
if (terResult != tesSUCCESS) return (terResult);
calculateFee ();
boost::recursive_mutex::scoped_lock sl (mEngine->getLedger ()->mLock);
mTxnAccount = mEngine->entryCache (ltACCOUNT_ROOT, Ledger::getAccountRootIndex (mTxnAccountID));
calculateFee ();
// Find source account
// If are only forwarding, due to resource limitations, we might verifying only some transactions, this would be probabilistic.