This commit is contained in:
jed
2012-11-14 16:10:10 -08:00
parent 2c2a8b5660
commit 58e5e07823
16 changed files with 28 additions and 41 deletions

View File

@@ -9,15 +9,9 @@
#include "OfferCreateTransactor.h"
#include "TrustSetTransactor.h"
SETUP_LOG();
Transactor::pointer Transactor::makeTransactor(const SerializedTransaction& txn,TransactionEngineParams params, TransactionEngine::pointer engine)
Transactor::pointer Transactor::makeTransactor(const SerializedTransaction& txn,TransactionEngineParams params, TransactionEngine* engine)
{
switch(txn.getTxnType())
{
@@ -41,7 +35,7 @@ Transactor::pointer Transactor::makeTransactor(const SerializedTransaction& txn,
}
Transactor::Transactor(const SerializedTransaction& txn,TransactionEngineParams params, TransactionEngine::pointer engine) : mTxn(txn), mParams(params), mEngine(engine)
Transactor::Transactor(const SerializedTransaction& txn,TransactionEngineParams params, TransactionEngine* engine) : mTxn(txn), mParams(params), mEngine(engine)
{
mHasAuthKey=false;
}
@@ -189,10 +183,6 @@ TER Transactor::apply()
if(terResult != tesSUCCESS) return(terResult);
calculateFee();
terResult=payFee();
if(terResult != tesSUCCESS) return(terResult);
boost::recursive_mutex::scoped_lock sl(mEngine->getLedger()->mLock);
@@ -201,10 +191,6 @@ TER Transactor::apply()
// Find source account
// If are only forwarding, due to resource limitations, we might verifying only some transactions, this would be probabilistic.
STAmount saSrcBalance;
if (!mTxnAccount)
{
cLog(lsTRACE) << boost::str(boost::format("applyTransaction: Delay transaction: source account does not exist: %s") %
@@ -218,6 +204,9 @@ TER Transactor::apply()
mHasAuthKey = mTxnAccount->isFieldPresent(sfAuthorizedKey);
}
terResult=payFee();
if(terResult != tesSUCCESS) return(terResult);
terResult=checkSig();
if(terResult != tesSUCCESS) return(terResult);