Fix bug in regular key set transactions.

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

View File

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

View File

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