From f579b05975130f196112378ceef319ceaf2d69cd Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 22 Jul 2013 05:21:08 -0700 Subject: [PATCH] Bugfixes. --- modules/ripple_app/ledger/ripple_InboundLedgers.cpp | 2 +- src/cpp/ripple/NetworkOPs.cpp | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/modules/ripple_app/ledger/ripple_InboundLedgers.cpp b/modules/ripple_app/ledger/ripple_InboundLedgers.cpp index 2bd0f82be6..ddc5491542 100644 --- a/modules/ripple_app/ledger/ripple_InboundLedgers.cpp +++ b/modules/ripple_app/ledger/ripple_InboundLedgers.cpp @@ -23,7 +23,7 @@ InboundLedger::pointer InboundLedgers::findCreate (uint256 const& hash, uint32 s ptr->addPeers (); ptr->setTimer (); // Cannot call in constructor } - else + else if (isComplete ()) { Ledger::pointer ledger = ptr->getLedger (); ledger->setClosed (); diff --git a/src/cpp/ripple/NetworkOPs.cpp b/src/cpp/ripple/NetworkOPs.cpp index 13694d7180..77823bda31 100644 --- a/src/cpp/ripple/NetworkOPs.cpp +++ b/src/cpp/ripple/NetworkOPs.cpp @@ -1258,15 +1258,6 @@ NetworkOPs::getAccountTxs (const RippleAddress& account, int32 minLedger, int32 ledger->pendSave(false); } - if (rawMeta.getLength() == 0) - { // Work around a bug that could leave the metadata missing - uint32 seq = static_cast(db->getBigInt("AccountTransactions.LedgerSeq")); - WriteLog(lsWARNING, NetworkOPs) << "Recovering ledger " << seq << ", txn " << txn->getID(); - Ledger::pointer ledger = getLedgerBySeq(seq); - if (ledger) - ledger->pendSave(false); - } - TransactionMetaSet::pointer meta = boost::make_shared (txn->getID (), txn->getLedger (), rawMeta.getData ()); ret.push_back (std::pair (txn, meta)); }