From 6a4fce383ef3afa1e0ffce7f1d2a740301e06983 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Wed, 15 Jun 2016 18:03:42 -0700 Subject: [PATCH] floor rates and priority. --- lib/bcoin/fees.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/fees.js b/lib/bcoin/fees.js index 04e42e1d..dac9aad2 100644 --- a/lib/bcoin/fees.js +++ b/lib/bcoin/fees.js @@ -572,7 +572,7 @@ PolicyEstimator.prototype.estimateFee = function estimateFee(target, smart) { if (rate < 0) return 0; - return rate; + return Math.floor(rate); } rate = -1; @@ -591,7 +591,7 @@ PolicyEstimator.prototype.estimateFee = function estimateFee(target, smart) { if (rate < 0) return 0; - return rate; + return Math.floor(rate); }; /** @@ -617,7 +617,7 @@ PolicyEstimator.prototype.estimatePriority = function estimatePriority(target, s priority = this.priStats.estimateMedian( target, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, this.bestHeight); - return priority; + return Math.floor(priority); } minPoolFee = this.network.minRelay; @@ -636,7 +636,7 @@ PolicyEstimator.prototype.estimatePriority = function estimatePriority(target, s if (priority < 0) return 0; - return priority; + return Math.floor(priority); }; /**