From 0ca48989d871771c00a3df80acf1d669f7e35819 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Wed, 16 May 2012 00:36:00 -0700 Subject: [PATCH] Disable transaction saving for now --- src/Transaction.cpp | 5 +++++ src/TransactionEngine.cpp | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Transaction.cpp b/src/Transaction.cpp index 1dd123e13..cdc051806 100644 --- a/src/Transaction.cpp +++ b/src/Transaction.cpp @@ -212,6 +212,9 @@ void Transaction::saveTransaction(Transaction::pointer txn) bool Transaction::save() const { // This code needs to be fixed to support new-style transactions - FIXME +#if 0 + // Identify minimums fields to write for now. + // Also maybe write effected accounts for use later. if ((mStatus == INVALID) || (mStatus == REMOVED)) return false; std::string sql = "INSERT INTO Transactions " @@ -251,6 +254,8 @@ bool Transaction::save() const ScopedLock sl(theApp->getTxnDB()->getDBLock()); Database* db = theApp->getTxnDB()->getDB(); return db->executeSQL(sql); +#endif + return true; } Transaction::pointer Transaction::transactionFromSQL(const std::string& sql) diff --git a/src/TransactionEngine.cpp b/src/TransactionEngine.cpp index 6cdb754c8..64c7da433 100644 --- a/src/TransactionEngine.cpp +++ b/src/TransactionEngine.cpp @@ -255,7 +255,7 @@ TransactionEngineResult TransactionEngine::doClaim(const SerializedTransaction& } // - // Verify claim is authorized + // Verify claim is authorized for public key. // std::vector vucCipher = txn.getITFieldVL(sfGenerator); @@ -272,6 +272,10 @@ TransactionEngineResult TransactionEngine::doClaim(const SerializedTransaction& return tenINVALID; } + // + // Verify generator not already in use. + // + uint160 hGeneratorID = naAccountPublic.getAccountID(); qry = lepNONE;