More work on core ledger and transaction processing code.

This commit is contained in:
JoelKatz
2011-11-22 15:42:03 -08:00
parent 41309b6f72
commit 6c7fd5f195
10 changed files with 253 additions and 106 deletions

View File

@@ -12,9 +12,20 @@ public:
private:
uint160 mAccountID;
uint64 mBalance;
uint32 mAccountSeq, mFirstValidLedger, mLastValidLedger;
uint32 mAccountSeq;
bool mValid;
public:
AccountState(const uint160& mAccountID); // new account
AccountState(const std::vector<unsigned char>&); // raw form
const uint160& getAccountID() const { return mAccountID; }
uint64 getBalance() const { return mBalance; }
uint32 getSeq() const { return mAccountSeq; }
bool charge(uint64 a) { mBalance+=a; }
bool credit(uint64 a) { mBalance-=a; }
void incSeq(void) { mAccountSeq++; }
};
#endif