Allow tunable node sizes to adjust cache sizes, sweep timing, fetch

timing, and so on. Node size defaults to "tiny", which converves
memory and bandwidth.
This commit is contained in:
JoelKatz
2013-01-27 13:55:59 -08:00
parent bdd5d4af9f
commit e8ac00e1a3
12 changed files with 104 additions and 6 deletions

View File

@@ -195,7 +195,8 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l
theApp->getIOService().post(boost::bind(&LedgerMaster::missingAcquireComplete, this, mMissingLedger));
}
if (theApp->getMasterLedgerAcquire().getFetchCount() < 4)
int fetch = theConfig.getSize(siLedgerFetch);
if (theApp->getMasterLedgerAcquire().getFetchCount() < fetch)
{
int count = 0;
typedef std::pair<uint32, uint256> u_pair;
@@ -203,7 +204,7 @@ bool LedgerMaster::acquireMissingLedger(Ledger::ref origLedger, const uint256& l
std::vector<u_pair> vec = origLedger->getLedgerHashes();
BOOST_REVERSE_FOREACH(const u_pair& it, vec)
{
if ((count < 3) && (it.first < ledgerSeq) &&
if ((count < fetch) && (it.first < ledgerSeq) &&
!mCompleteLedgers.hasValue(it.first) && !theApp->getMasterLedgerAcquire().find(it.second))
{
++count;