fees: minor.

This commit is contained in:
Christopher Jeffrey 2016-08-22 23:01:38 -07:00
parent 7b723baedd
commit f6f0dceaab
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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++;
}; };