diff --git a/src/AccountState.h b/src/AccountState.h index be8677b5d2..c6aaf1b3a8 100644 --- a/src/AccountState.h +++ b/src/AccountState.h @@ -20,9 +20,11 @@ public: typedef boost::shared_ptr pointer; private: - NewcoinAddress mAccountID; - SerializedLedgerEntry::pointer mLedgerEntry; - bool mValid; + NewcoinAddress mAccountID; + NewcoinAddress mAuthorizedKey; + SerializedLedgerEntry::pointer mLedgerEntry; + + bool mValid; public: AccountState(const NewcoinAddress& AccountID); // For new accounts diff --git a/src/Ledger.h b/src/Ledger.h index 90b1d7a070..d64577a64d 100644 --- a/src/Ledger.h +++ b/src/Ledger.h @@ -16,7 +16,6 @@ #include "BitcoinUtil.h" #include "SHAMap.h" - enum LedgerStateParms { lepNONE = 0, // no special flags @@ -38,20 +37,19 @@ class Ledger : public boost::enable_shared_from_this public: typedef boost::shared_ptr pointer; - enum TransResult { - TR_ERROR =-1, - TR_SUCCESS =0, - TR_NOTFOUND =1, - TR_ALREADY =2, - TR_BADTRANS =3, // the transaction itself is corrupt - TR_BADACCT =4, // one of the accounts is invalid - TR_INSUFF =5, // the sending(apply)/receiving(remove) account is broke - TR_PASTASEQ =6, // account is past this transaction - TR_PREASEQ =7, // account is missing transactions before this - TR_BADLSEQ =8, // ledger too early - TR_TOOSMALL =9, // amount is less than Tx fee + TR_ERROR = -1, + TR_SUCCESS = 0, + TR_NOTFOUND = 1, + TR_ALREADY = 2, + TR_BADTRANS = 3, // the transaction itself is corrupt + TR_BADACCT = 4, // one of the accounts is invalid + TR_INSUFF = 5, // the sending(apply)/receiving(remove) account is broke + TR_PASTASEQ = 6, // account is past this transaction + TR_PREASEQ = 7, // account is missing transactions before this + TR_BADLSEQ = 8, // ledger too early + TR_TOOSMALL = 9, // amount is less than Tx fee }; diff --git a/src/LedgerFormats.cpp b/src/LedgerFormats.cpp index ca833557a3..7a21c7271e 100644 --- a/src/LedgerFormats.cpp +++ b/src/LedgerFormats.cpp @@ -8,6 +8,7 @@ LedgerEntryFormat LedgerFormats[]= { "AccountRoot", ltACCOUNT_ROOT, { { S_FIELD(Flags), STI_UINT32, SOE_FLAGS, 0 }, { S_FIELD(Account), STI_ACCOUNT, SOE_REQUIRED, 0 }, + { S_FIELD(AuthorizedKey),STI_VL, SOE_REQUIRED, 0 }, { S_FIELD(Sequence), STI_UINT32, SOE_REQUIRED, 0 }, { S_FIELD(Balance), STI_UINT64, SOE_REQUIRED, 0 }, { S_FIELD(LastReceive), STI_UINT32, SOE_REQUIRED, 0 }, diff --git a/src/SerializedObject.h b/src/SerializedObject.h index 4e41fc0569..94177d2bfa 100644 --- a/src/SerializedObject.h +++ b/src/SerializedObject.h @@ -32,6 +32,7 @@ enum SOE_Field sfBorrower, sfLender, sfLimit, sfOfferCurrency, sfLedgerHash, sfLastReceive, sfLastTxn, sfNextRate, sfNextRateLgr, sfNextRateExp, sfNickname, sfMinimumOffer, + sfAuthorizedKey, // test fields sfTest1, sfTest2, sfTest3, sfTest4