diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index 61b2ded308..1c81e5c407 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -426,30 +426,6 @@ Transaction::pointer NetworkOPs::findTransactionByID(const uint256& transactionI return Transaction::load(transactionID); } -#if 0 -int NetworkOPs::findTransactionsBySource(const uint256& uLedger, std::list& txns, - const RippleAddress& sourceAccount, uint32 minSeq, uint32 maxSeq) -{ - AccountState::pointer state = getAccountState(uLedger, sourceAccount); - if (!state) return 0; - if (minSeq > state->getSeq()) return 0; - if (maxSeq > state->getSeq()) maxSeq = state->getSeq(); - if (maxSeq > minSeq) return 0; - - int count = 0; - for(unsigned int i = minSeq; i <= maxSeq; ++i) - { - Transaction::pointer txn = Transaction::findFrom(sourceAccount, i); - if(txn) - { - txns.push_back(txn); - ++count; - } - } - return count; -} -#endif - int NetworkOPs::findTransactionsByDestination(std::list& txns, const RippleAddress& destinationAccount, uint32 startLedgerSeq, uint32 endLedgerSeq, int maxTransactions) { diff --git a/src/cpp/ripple/Transaction.cpp b/src/cpp/ripple/Transaction.cpp index 4ae2a4636a..7d4369e745 100644 --- a/src/cpp/ripple/Transaction.cpp +++ b/src/cpp/ripple/Transaction.cpp @@ -249,16 +249,6 @@ Transaction::pointer Transaction::load(const uint256& id) return transactionFromSQL(sql); } -Transaction::pointer Transaction::findFrom(const RippleAddress& fromID, uint32 seq) -{ - std::string sql = "SELECT LedgerSeq,Status,RawTxn FROM Transactions WHERE FromID='"; - sql.append(fromID.humanAccountID()); - sql.append("' AND FromSeq='"); - sql.append(boost::lexical_cast(seq)); - sql.append("';"); - return transactionFromSQL(sql); -} - bool Transaction::convertToTransactions(uint32 firstLedgerSeq, uint32 secondLedgerSeq, bool checkFirstTransactions, bool checkSecondTransactions, const SHAMap::SHAMapDiff& inMap, std::map >& outMap) diff --git a/src/cpp/ripple/Transaction.h b/src/cpp/ripple/Transaction.h index d000dea5aa..0ec8eadba9 100644 --- a/src/cpp/ripple/Transaction.h +++ b/src/cpp/ripple/Transaction.h @@ -99,7 +99,6 @@ public: // database functions void save(); static Transaction::pointer load(const uint256& id); - static Transaction::pointer findFrom(const RippleAddress& fromID, uint32 seq); // conversion function static bool convertToTransactions(uint32 ourLedgerSeq, uint32 otherLedgerSeq,