From a5da80d36d554145a2f4a3b7e00612b32d9b20f5 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 18 Jan 2012 14:14:23 -0800 Subject: [PATCH] Fix issues in applying local transactions. --- Ledger.cpp | 4 ++-- LocalAccount.h | 4 ++-- LocalTransaction.cpp | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Ledger.cpp b/Ledger.cpp index ece7904481..ecd7b124d8 100644 --- a/Ledger.cpp +++ b/Ledger.cpp @@ -277,8 +277,8 @@ void LocalAccount::syncLedger() else { mLgrBalance=as->getBalance(); - if( (mLgrBalance!=0) && (mAccountSeq==0) ) mAccountSeq=1; - if(mAccountSeqgetSeq()) mAccountSeq=as->getSeq(); + if( (mLgrBalance!=0) && (mTxnSeq==0) ) mTxnSeq=1; + if(mTxnSeqgetSeq()) mTxnSeq=as->getSeq(); } } diff --git a/LocalAccount.h b/LocalAccount.h index a0c54e6529..748150e1ba 100644 --- a/LocalAccount.h +++ b/LocalAccount.h @@ -19,7 +19,7 @@ protected: // family information boost::shared_ptr mFamily; - int mAccountSeq; + int mAccountFSeq; // local usage tracking uint64 mLgrBalance; // The balance, from the last ledger @@ -36,7 +36,7 @@ public: bool updateBalance(); // writes changed balance/seq const uint160& getAddress() const { return mAcctID; } - int getAcctSeq() const { return mAccountSeq; } + int getAcctFSeq() const { return mAccountFSeq; } std::string getLocalAccountName() const; // The name used locally to identify this account std::string getAccountName() const; // The normal account name used to send to this account diff --git a/LocalTransaction.cpp b/LocalTransaction.cpp index b69800f403..7f51b188c9 100644 --- a/LocalTransaction.cpp +++ b/LocalTransaction.cpp @@ -31,3 +31,8 @@ bool LocalTransaction::makeTransaction() } return true; } + +void LocalTransaction::applyTransaction() +{ + mTransaction=theApp->getOPs().processTransaction(mTransaction); +}