fees: minor.
This commit is contained in:
parent
7b723baedd
commit
f6f0dceaab
@ -505,7 +505,7 @@ PolicyEstimator.prototype.isPriPoint = function isPriPoint(fee, priority) {
|
|||||||
PolicyEstimator.prototype.processTX = function processTX(entry, current) {
|
PolicyEstimator.prototype.processTX = function processTX(entry, current) {
|
||||||
var height = entry.height;
|
var height = entry.height;
|
||||||
var hash = entry.tx.hash('hex');
|
var hash = entry.tx.hash('hex');
|
||||||
var fee, rate, priority, stat;
|
var fee, rate, priority, item;
|
||||||
|
|
||||||
if (this.map[hash]) {
|
if (this.map[hash]) {
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
@ -533,21 +533,21 @@ PolicyEstimator.prototype.processTX = function processTX(entry, current) {
|
|||||||
this.logger.spam('estimatefee: Processing mempool tx %s.', entry.tx.rhash);
|
this.logger.spam('estimatefee: Processing mempool tx %s.', entry.tx.rhash);
|
||||||
|
|
||||||
if (fee === 0 || this.isPriPoint(rate, priority)) {
|
if (fee === 0 || this.isPriPoint(rate, priority)) {
|
||||||
stat = new StatEntry();
|
item = new StatEntry();
|
||||||
stat.blockHeight = height;
|
item.blockHeight = height;
|
||||||
stat.bucketIndex = this.priStats.addTX(height, priority);
|
item.bucketIndex = this.priStats.addTX(height, priority);
|
||||||
} else if (this.isFeePoint(rate, priority)) {
|
} else if (this.isFeePoint(rate, priority)) {
|
||||||
stat = new StatEntry();
|
item = new StatEntry();
|
||||||
stat.blockHeight = height;
|
item.blockHeight = height;
|
||||||
stat.bucketIndex = this.feeStats.addTX(height, rate);
|
item.bucketIndex = this.feeStats.addTX(height, rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stat) {
|
if (!item) {
|
||||||
this.logger.spam('estimatefee: Not adding tx %s.', entry.tx.rhash);
|
this.logger.spam('estimatefee: Not adding tx %s.', entry.tx.rhash);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.map[hash] = stat;
|
this.map[hash] = item;
|
||||||
this.mapSize++;
|
this.mapSize++;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user