mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 05:55:51 +00:00
Second check if fetch pack should be skipped.
This commit is contained in:
@@ -285,6 +285,12 @@ bool LoadFeeTrack::raiseLocalFee()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LoadFeeTrack::isLoaded()
|
||||||
|
{
|
||||||
|
boost::mutex::scoped_lock sl(mLock);
|
||||||
|
return (raiseCount != 0) || (mLocalTxnLoadFee != lftNormalFee);
|
||||||
|
}
|
||||||
|
|
||||||
bool LoadFeeTrack::lowerLocalFee()
|
bool LoadFeeTrack::lowerLocalFee()
|
||||||
{
|
{
|
||||||
boost::mutex::scoped_lock sl(mLock);
|
boost::mutex::scoped_lock sl(mLock);
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ public:
|
|||||||
void setRemoteFee(uint32);
|
void setRemoteFee(uint32);
|
||||||
bool raiseLocalFee();
|
bool raiseLocalFee();
|
||||||
bool lowerLocalFee();
|
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);
|
// 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)
|
Ledger::pointer wantLedger, Ledger::pointer haveLedger)
|
||||||
{
|
{
|
||||||
|
if (theApp->getFeeTrack().isLoaded())
|
||||||
|
{
|
||||||
|
cLog(lsINFO) << "Too busy to make fetch pack";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Peer::pointer peer = wPeer.lock();
|
Peer::pointer peer = wPeer.lock();
|
||||||
|
|||||||
Reference in New Issue
Block a user