mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Reduce number of async fetches
This commit is contained in:
committed by
Vinnie Falco
parent
96e8cddfc2
commit
07d0379edd
@@ -130,7 +130,9 @@ public:
|
||||
int getDesiredAsyncReadCount ()
|
||||
{
|
||||
// We prefer a client not fill our cache
|
||||
return m_cache.getTargetSize() / 4;
|
||||
// We don't want to push data out of the cache
|
||||
// before it's retrieved
|
||||
return m_cache.getTargetSize() / asyncDivider;
|
||||
}
|
||||
|
||||
NodeObject::Ptr fetch (uint256 const& hash)
|
||||
|
||||
@@ -30,6 +30,9 @@ enum
|
||||
|
||||
// Expiration time for cached nodes
|
||||
,cacheTargetSeconds = 300
|
||||
|
||||
// Fraction of the cache one query source can take
|
||||
,asyncDivider = 8
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user