From 4800899c478bbc5aee2b4e4fd3baab7277f224eb Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sat, 29 Sep 2012 00:06:17 -0700 Subject: [PATCH] Cleanup. bugfixes. --- src/TransactionFormats.cpp | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/src/TransactionFormats.cpp b/src/TransactionFormats.cpp index 2216180dd..3665af7d5 100644 --- a/src/TransactionFormats.cpp +++ b/src/TransactionFormats.cpp @@ -4,13 +4,16 @@ #define TF_BASE \ { sfTransactionType, SOE_REQUIRED }, \ { sfFlags, SOE_REQUIRED }, \ + { sfSourceTag, SOE_OPTIONAL }, \ + { sfAccount, SOE_REQUIRED }, \ + { sfSequence, SOE_REQUIRED }, \ + { sfFee, SOE_REQUIRED }, \ + { sfSigningPubKey, SOE_REQUIRED }, \ { sfSignature, SOE_OPTIONAL }, TransactionFormat InnerTxnFormats[]= { { "AccountSet", ttACCOUNT_SET, { TF_BASE - { sfFlags, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfEmailHash, SOE_OPTIONAL }, { sfWalletLocator, SOE_OPTIONAL }, { sfMessageKey, SOE_OPTIONAL }, @@ -21,17 +24,12 @@ TransactionFormat InnerTxnFormats[]= { sfInvalid, SOE_END } } }, { "Claim", ttCLAIM, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfGenerator, SOE_REQUIRED }, { sfPublicKey, SOE_REQUIRED }, - { sfSignature, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "CreditSet", ttCREDIT_SET, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfDestination, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfLimitAmount, SOE_OPTIONAL }, { sfQualityIn, SOE_OPTIONAL }, { sfQualityOut, SOE_OPTIONAL }, @@ -39,73 +37,53 @@ TransactionFormat InnerTxnFormats[]= }, /* { "Invoice", ttINVOICE, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfTarget, SOE_REQUIRED }, { sfAmount, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfDestination, SOE_OPTIONAL }, { sfIdentifier, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, */ { "NicknameSet", ttNICKNAME_SET, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfNickname, SOE_REQUIRED }, { sfMinimumOffer, SOE_OPTIONAL }, - { sfSignature, SOE_OPTIONAL }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "OfferCreate", ttOFFER_CREATE, { TF_BASE - { sfFlags, SOE_REQUIRED}, { sfTakerPays, SOE_REQUIRED }, { sfTakerGets, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfExpiration, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "OfferCancel", ttOFFER_CANCEL, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfOfferSequence, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "PasswordFund", ttPASSWORD_FUND, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfDestination, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "PasswordSet", ttPASSWORD_SET, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfAuthorizedKey, SOE_REQUIRED }, { sfGenerator, SOE_REQUIRED }, { sfPublicKey, SOE_REQUIRED }, - { sfSignature, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "Payment", ttPAYMENT, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfDestination, SOE_REQUIRED }, { sfAmount, SOE_REQUIRED }, { sfSendMax, SOE_OPTIONAL }, { sfPaths, SOE_OPTIONAL }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvoiceID, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "WalletAdd", ttWALLET_ADD, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfAmount, SOE_REQUIRED }, { sfAuthorizedKey, SOE_REQUIRED }, { sfPublicKey, SOE_REQUIRED }, - { sfSignature, SOE_REQUIRED }, - { sfSourceTag, SOE_OPTIONAL }, { sfInvalid, SOE_END } } }, { "Contract", ttCONTRACT, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfExpiration, SOE_REQUIRED }, { sfBondAmount, SOE_REQUIRED }, { sfStampEscrow, SOE_REQUIRED }, @@ -117,7 +95,6 @@ TransactionFormat InnerTxnFormats[]= { sfInvalid, SOE_END } } }, { "RemoveContract", ttCONTRACT_REMOVE, { TF_BASE - { sfFlags, SOE_REQUIRED }, { sfTarget, SOE_REQUIRED }, { sfInvalid, SOE_END } } },