diff --git a/src/cpp/ripple/RegularKeySetTransactor.cpp b/src/cpp/ripple/RegularKeySetTransactor.cpp index 13dbcf4b41..0c89cad5f0 100644 --- a/src/cpp/ripple/RegularKeySetTransactor.cpp +++ b/src/cpp/ripple/RegularKeySetTransactor.cpp @@ -9,7 +9,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 diff --git a/src/cpp/ripple/Transactor.cpp b/src/cpp/ripple/Transactor.cpp index 9d0b41795f..95cfd5746f 100644 --- a/src/cpp/ripple/Transactor.cpp +++ b/src/cpp/ripple/Transactor.cpp @@ -209,11 +209,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.