mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 21:45:52 +00:00
Second check if fetch pack should be skipped.
This commit is contained in:
@@ -285,6 +285,12 @@ bool LoadFeeTrack::raiseLocalFee()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoadFeeTrack::isLoaded()
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
return (raiseCount != 0) || (mLocalTxnLoadFee != lftNormalFee);
|
||||
}
|
||||
|
||||
bool LoadFeeTrack::lowerLocalFee()
|
||||
{
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
void setRemoteFee(uint32);
|
||||
bool raiseLocalFee();
|
||||
bool lowerLocalFee();
|
||||
bool isLoaded() { return (raiseCount != 0) || (mLocalTxnLoadFee != lftNormalFee); }
|
||||
bool isLoaded();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2004,9 +2004,16 @@ void NetworkOPs::getBookPage(Ledger::pointer lpLedger, const uint160& uTakerPays
|
||||
// jvResult["nodes"] = Json::Value(Json::arrayValue);
|
||||
}
|
||||
|
||||
void NetworkOPs::makeFetchPack(Job&, boost::weak_ptr<Peer> wPeer, boost::shared_ptr<ripple::TMGetObjectByHash> request,
|
||||
void NetworkOPs::makeFetchPack(Job&, boost::weak_ptr<Peer> wPeer,
|
||||
boost::shared_ptr<ripple::TMGetObjectByHash> request,
|
||||
Ledger::pointer wantLedger, Ledger::pointer haveLedger)
|
||||
{
|
||||
if (theApp->getFeeTrack().isLoaded())
|
||||
{
|
||||
cLog(lsINFO) << "Too busy to make fetch pack";
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Peer::pointer peer = wPeer.lock();
|
||||
|
||||
Reference in New Issue
Block a user