Browse Source

Don't break lines at 80 characters.

patch-2
David de Kloet 10 years ago
parent
commit
8a8412f04a
  1. 9
      lib/transaction/transaction.js

9
lib/transaction/transaction.js

@ -228,8 +228,7 @@ Transaction.prototype._isFeeTooLarge = function(opts) {
return; return;
} }
var fee = this._getUnspentValue(); var fee = this._getUnspentValue();
var maximumFee = Math.floor( var maximumFee = Math.floor(Transaction.FEE_SECURITY_MARGIN * this._estimateFee());
Transaction.FEE_SECURITY_MARGIN * this._estimateFee());
if (fee > maximumFee) { if (fee > maximumFee) {
if (this._missingChange()) { if (this._missingChange()) {
return new errors.Transaction.ChangeAddressMissing( return new errors.Transaction.ChangeAddressMissing(
@ -245,8 +244,7 @@ Transaction.prototype._isFeeTooSmall = function(opts) {
return; return;
} }
var fee = this._getUnspentValue(); var fee = this._getUnspentValue();
var minimumFee = Math.ceil( var minimumFee = Math.ceil(this._estimateFee() / Transaction.FEE_SECURITY_MARGIN);
this._estimateFee() / Transaction.FEE_SECURITY_MARGIN);
if (fee < minimumFee) { if (fee < minimumFee) {
return new errors.Transaction.FeeError.TooSmall( return new errors.Transaction.FeeError.TooSmall(
'expected more than ' + minimumFee + ' but got ' + fee); 'expected more than ' + minimumFee + ' but got ' + fee);
@ -264,8 +262,7 @@ Transaction.prototype._hasDustOutputs = function(opts) {
var index, output; var index, output;
for (index in this.outputs) { for (index in this.outputs) {
output = this.outputs[index]; output = this.outputs[index];
if (output.satoshis < Transaction.DUST_AMOUNT && if (output.satoshis < Transaction.DUST_AMOUNT && !output.script.isDataOut()) {
!output.script.isDataOut()) {
return new errors.Transaction.DustOutputs(); return new errors.Transaction.DustOutputs();
} }
} }

Loading…
Cancel
Save