diff --git a/src/cpp/ripple/LedgerAcquire.cpp b/src/cpp/ripple/LedgerAcquire.cpp index 68f0237b3d..8da67496dd 100644 --- a/src/cpp/ripple/LedgerAcquire.cpp +++ b/src/cpp/ripple/LedgerAcquire.cpp @@ -787,7 +787,13 @@ LedgerAcquire::pointer LedgerAcquireMaster::findCreate(const uint256& hash) ptr->setTimer(); // Cannot call in constructor } else + { + Ledger::pointer ledger = ptr->getLedger(); + ledger->setClosed(); + ledger->setImmutable(); + theApp->getLedgerMaster().storeLedger(ledger); cLog(lsDEBUG) << "Acquiring ledger we already have: " << hash; + } return ptr; } diff --git a/src/cpp/ripple/LedgerMaster.cpp b/src/cpp/ripple/LedgerMaster.cpp index 20a3d93c06..f7169777fb 100644 --- a/src/cpp/ripple/LedgerMaster.cpp +++ b/src/cpp/ripple/LedgerMaster.cpp @@ -265,7 +265,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l { typedef std::pair u_pair; std::vector vec = origLedger->getLedgerHashes(); - BOOST_REVERSE_FOREACH(const u_pair& it, vec) + BOOST_FOREACH(const u_pair& it, vec) { if ((fetchCount < fetchMax) && (it.first < ledgerSeq) && !mCompleteLedgers.hasValue(it.first) && !theApp->getMasterLedgerAcquire().find(it.second)) diff --git a/src/cpp/ripple/SHAMapNodes.cpp b/src/cpp/ripple/SHAMapNodes.cpp index f171b7a098..1719b3d50f 100644 --- a/src/cpp/ripple/SHAMapNodes.cpp +++ b/src/cpp/ripple/SHAMapNodes.cpp @@ -571,6 +571,4 @@ std::ostream& operator<<(std::ostream& out, const SHAMapMissingNode& mn) return out; } - - // vim:ts=4 diff --git a/src/cpp/ripple/TaggedCache.h b/src/cpp/ripple/TaggedCache.h index 8b12d80da6..c7fb419028 100644 --- a/src/cpp/ripple/TaggedCache.h +++ b/src/cpp/ripple/TaggedCache.h @@ -232,7 +232,7 @@ template bool TaggedCache::del(c if (!valid || entry.isExpired()) mCache.erase(cit); - return true; + return ret; } template diff --git a/src/cpp/ripple/TransactionFormats.cpp b/src/cpp/ripple/TransactionFormats.cpp index 3347c541e0..ef3b9c0c3a 100644 --- a/src/cpp/ripple/TransactionFormats.cpp +++ b/src/cpp/ripple/TransactionFormats.cpp @@ -82,7 +82,7 @@ void TFInit() << SOElement(sfReferenceFeeUnits, SOE_REQUIRED) << SOElement(sfReserveBase, SOE_REQUIRED) << SOElement(sfReserveIncrement, SOE_REQUIRED) - ; + ; } TransactionFormat* TransactionFormat::getTxnFormat(TransactionType t) diff --git a/src/cpp/ripple/ValidationCollection.cpp b/src/cpp/ripple/ValidationCollection.cpp index cb43e6a652..6e1bc6e251 100644 --- a/src/cpp/ripple/ValidationCollection.cpp +++ b/src/cpp/ripple/ValidationCollection.cpp @@ -77,6 +77,8 @@ bool ValidationCollection::addValidation(SerializedValidation::ref val, const st it->second = val; condWrite(); } + else + isCurrenty = false; } } @@ -200,7 +202,7 @@ int ValidationCollection::getLoadRatio(bool overLoaded) std::list ValidationCollection::getCurrentTrustedValidations() { - uint32 cutoff = theApp->getOPs().getNetworkTimeNC() - LEDGER_VAL_INTERVAL; + uint32 cutoff = theApp->getOPs().getNetworkTimeNC() - LEDGER_VAL_INTERVAL; std::list ret; diff --git a/src/cpp/ripple/ripple.proto b/src/cpp/ripple/ripple.proto index 0cb6c45ba3..8e5def2536 100644 --- a/src/cpp/ripple/ripple.proto +++ b/src/cpp/ripple/ripple.proto @@ -119,6 +119,8 @@ message TMStatusChange { optional bytes ledgerHash = 4; optional bytes ledgerHashPrevious = 5; optional uint64 networkTime = 6; + optional uint32 firstSeq = 7; + optional uint32 lastSeq = 8; } @@ -222,6 +224,7 @@ message TMIndexedObject optional bytes nodeID = 2; optional bytes index = 3; optional bytes data = 4; + optional uint32 ledgerSeq = 5; } message TMGetObjectByHash @@ -233,6 +236,7 @@ message TMGetObjectByHash otTRANSACTION_NODE = 3; otSTATE_NODE = 4; otCAS_OBJECT = 5; + otFETCH_PACK = 6; } required ObjectType type = 1;