Don't raise txn fees so quickly.

This commit is contained in:
JoelKatz
2013-03-05 09:26:55 -08:00
parent ecb9e7db26
commit 231a514265
2 changed files with 7 additions and 1 deletions

View File

@@ -245,6 +245,10 @@ void LoadFeeTrack::setRemoteFee(uint32 f)
bool LoadFeeTrack::raiseLocalFee()
{
boost::mutex::scoped_lock sl(mLock);
if (++raiseCount < 2)
return false;
uint32 origFee = mLocalTxnLoadFee;
if (mLocalTxnLoadFee < mRemoteTxnLoadFee) // make sure this fee takes effect
@@ -265,6 +269,7 @@ bool LoadFeeTrack::lowerLocalFee()
{
boost::mutex::scoped_lock sl(mLock);
uint32 origFee = mLocalTxnLoadFee;
raiseCount = 0;
mLocalTxnLoadFee -= (mLocalTxnLoadFee / lftFeeDecFraction ); // reduce by 1/4