From 056f171e22eed972792e506df95ae80196106564 Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Sun, 10 May 2015 01:32:28 +0200 Subject: [PATCH] Remove the ability to disable the check that a specified fee is equal to the unspent value. --- lib/transaction/transaction.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/transaction/transaction.js b/lib/transaction/transaction.js index 47c8ff5..4d56e67 100644 --- a/lib/transaction/transaction.js +++ b/lib/transaction/transaction.js @@ -197,14 +197,15 @@ Transaction.prototype.getSerializationError = function(opts) { } var feeIsDifferent = this._isFeeDifferent(); + if (feeIsDifferent) { + return new errors.Transaction.FeeError.Different(feeIsDifferent); + } + var missingChange = this._missingChange(); var feeIsTooLarge = this._isFeeTooLarge(); var feeIsTooSmall = this._isFeeTooSmall(); var isFullySigned = this.isFullySigned(); - if (!opts.disableDifferentFees && feeIsDifferent) { - return new errors.Transaction.FeeError.Different(feeIsDifferent); - } if (!opts.disableLargeFees && feeIsTooLarge) { if (missingChange) { return new errors.Transaction.ChangeAddressMissing('Fee is too large and no change address was provided');