mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't make a fetch pack if load is too high.
This commit is contained in:
@@ -182,6 +182,7 @@ public:
|
||||
void setRemoteFee(uint32);
|
||||
bool raiseLocalFee();
|
||||
bool lowerLocalFee();
|
||||
bool isLoaded() { return (raiseCount != 0) || (mLocalTxnLoadFee != lftNormalFee); }
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1858,6 +1858,11 @@ void Peer::doProofOfWork(Job&, boost::weak_ptr<Peer> peer, ProofOfWork::pointer
|
||||
|
||||
void Peer::doFetchPack(const boost::shared_ptr<ripple::TMGetObjectByHash>& packet)
|
||||
{
|
||||
if (theApp->getFeeTrack().isLoaded())
|
||||
{
|
||||
cLog(lsINFO) << "Too busy to make fetch pack";
|
||||
return;
|
||||
}
|
||||
if (packet->ledgerhash().size() != 32)
|
||||
{
|
||||
cLog(lsWARNING) << "FetchPack hash size malformed";
|
||||
|
||||
Reference in New Issue
Block a user