diff --git a/lib/bcoin/address.js b/lib/bcoin/address.js index 34506bd8..5858c33b 100644 --- a/lib/bcoin/address.js +++ b/lib/bcoin/address.js @@ -102,9 +102,9 @@ Address.prototype.toString = function toString() { Address.prototype.inspect = function inspect() { return ''; }; diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index d9ad5fea..f64b9b03 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -1418,7 +1418,7 @@ TX.prototype.getPriority = function getPriority(height, size) { var sum, i, input, age, value; if (this.isCoinbase()) - return 0; + return { value: 0, priority: 0 }; if (height == null) { height = this.height; @@ -1443,8 +1443,8 @@ TX.prototype.getPriority = function getPriority(height, size) { if (input.coin.height <= height) { age = height - input.coin.height; - value += input.coin.value; sum += input.coin.value * age; + value += input.coin.value; } }