Browse Source

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

patch-2
David de Kloet 10 years ago
parent
commit
056f171e22
  1. 7
      lib/transaction/transaction.js

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

Loading…
Cancel
Save