mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Rework the way the results of ledger and TX map acquisition is passed up and down the
call chain so that the peer logic will know how helpful peers are being, not just whether they're sending invalid data.
This commit is contained in:
@@ -213,12 +213,28 @@ void ProofOfWorkGenerator::sweep()
|
||||
|
||||
void ProofOfWorkGenerator::loadHigh()
|
||||
{
|
||||
// WRITEME
|
||||
time_t now = time(NULL);
|
||||
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
if (mLastDifficultyChange == now)
|
||||
return;
|
||||
if (mPowEntry == 30)
|
||||
return;
|
||||
++mPowEntry;
|
||||
mLastDifficultyChange = now;
|
||||
}
|
||||
|
||||
void ProofOfWorkGenerator::loadLow()
|
||||
{
|
||||
// WRITEME
|
||||
time_t now = time(NULL);
|
||||
|
||||
boost::mutex::scoped_lock sl(mLock);
|
||||
if (mLastDifficultyChange == now)
|
||||
return;
|
||||
if (mPowEntry == 0)
|
||||
return;
|
||||
--mPowEntry;
|
||||
mLastDifficultyChange = now;
|
||||
}
|
||||
|
||||
struct PowEntry
|
||||
|
||||
Reference in New Issue
Block a user