halflife.
This commit is contained in:
parent
361134029f
commit
5193e3533a
@ -865,7 +865,7 @@ Mempool.prototype.removeUnchecked = function removeUnchecked(entry, limit, callb
|
||||
*/
|
||||
|
||||
Mempool.prototype.getMinRate = function getMinRate() {
|
||||
var now, halflife, exp;
|
||||
var now, halflife, size;
|
||||
|
||||
if (!this.blockSinceBump || this.minFeeRate === 0)
|
||||
return this.minFeeRate;
|
||||
@ -874,10 +874,11 @@ Mempool.prototype.getMinRate = function getMinRate() {
|
||||
|
||||
if (now > this.lastFeeUpdate + 10) {
|
||||
halflife = constants.mempool.FEE_HALFLIFE;
|
||||
size = this.getSize();
|
||||
|
||||
if (this.size < this.maxSize / 4)
|
||||
if (size < this.maxSize / 4)
|
||||
halflife >>>= 2;
|
||||
else if (this.size < this.maxSize / 2)
|
||||
else if (size < this.maxSize / 2)
|
||||
halflife >>>= 1;
|
||||
|
||||
this.minFeeRate /= Math.pow(2.0, (now - this.lastFeeUpdate) / halflife | 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user