mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Don't raise txn fees so quickly.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user