mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Basic stuff needed to start merging.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l
|
||||
{
|
||||
typedef std::pair<uint32, uint256> u_pair;
|
||||
std::vector<u_pair> 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))
|
||||
|
||||
@@ -571,6 +571,4 @@ std::ostream& operator<<(std::ostream& out, const SHAMapMissingNode& mn)
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// vim:ts=4
|
||||
|
||||
@@ -232,7 +232,7 @@ template<typename c_Key, typename c_Data> bool TaggedCache<c_Key, c_Data>::del(c
|
||||
|
||||
if (!valid || entry.isExpired())
|
||||
mCache.erase(cit);
|
||||
return true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<typename c_Key, typename c_Data>
|
||||
|
||||
@@ -82,7 +82,7 @@ void TFInit()
|
||||
<< SOElement(sfReferenceFeeUnits, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveBase, SOE_REQUIRED)
|
||||
<< SOElement(sfReserveIncrement, SOE_REQUIRED)
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
TransactionFormat* TransactionFormat::getTxnFormat(TransactionType t)
|
||||
|
||||
@@ -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<SerializedValidation::pointer> ValidationCollection::getCurrentTrustedValidations()
|
||||
{
|
||||
uint32 cutoff = theApp->getOPs().getNetworkTimeNC() - LEDGER_VAL_INTERVAL;
|
||||
uint32 cutoff = theApp->getOPs().getNetworkTimeNC() - LEDGER_VAL_INTERVAL;
|
||||
|
||||
std::list<SerializedValidation::pointer> ret;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user