diff --git a/lib/server.js b/lib/server.js index a26fc58..c7c70a4 100644 --- a/lib/server.js +++ b/lib/server.js @@ -1158,14 +1158,20 @@ WalletService.prototype._sampleFeeLevels = function(network, points, cb) { return cb(err); } + var failed = []; var levels = _.zipObject(_.map(points, function(p) { var feePerKb = _.isObject(result) ? +result[p] : -1; - if (feePerKb < 0) { - log.info('Could not compute fee estimation (nbBlocks=' + p + ')'); - } + if (feePerKb < 0) + failed.push(p); + return [p, Utils.strip(feePerKb * 1e8)]; })); + if (failed.length) { + var logger = network == 'livenet' ? log.warn : log.debug; + logger('Could not compute fee estimation in ' + network + ': ' + failed.join(',')); + } + return cb(null, levels); }); };