Remove the ability to disable the check that a specified fee is equal to the unspent value.

This commit is contained in:
David de Kloet 2015-05-10 01:32:28 +02:00
parent b1e54101d3
commit 056f171e22
1 changed files with 4 additions and 3 deletions

View File

@ -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');