diff --git a/lib/primitives/tx.js b/lib/primitives/tx.js index 082cccd9..0989b6c4 100644 --- a/lib/primitives/tx.js +++ b/lib/primitives/tx.js @@ -1935,10 +1935,15 @@ TX.prototype.getRoundFee = function getRoundFee(size, rate) { */ TX.prototype.getRate = function getRate(view, size) { + var fee = this.getFee(view); + + if (fee < 0) + return 0; + if (size == null) size = this.getVirtualSize(); - return policy.getRate(size, this.getFee(view)); + return policy.getRate(size, fee); }; /**