Browse Source

revert breaking conditions for small inputs to improve tracing

activeAddress
Ivan Socolsky 9 years ago
parent
commit
5afc74d4f6
  1. 10
      lib/server.js

10
lib/server.js

@ -1371,14 +1371,14 @@ WalletService.prototype._selectTxInputs = function(txp, utxosToExclude, cb) {
} }
if (!_.isEmpty(bigInputs)) { if (!_.isEmpty(bigInputs)) {
if ((feeVsAmountRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_TX_AMOUNT_FACTOR && if (amountVsUtxoRatio < Defaults.UTXO_SELECTION_MIN_TX_AMOUNT_VS_UTXO_FACTOR) {
feeVsSingleInputFeeRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_SINGLE_UTXO_FEE_FACTOR)) { log.debug('Breaking because utxo is too small compared to tx amount');
log.debug('Breaking because fee exceeded fee/amount ratio and fee is too expensive compared to single input tx');
return false; return false;
} }
if (amountVsUtxoRatio < Defaults.UTXO_SELECTION_MIN_TX_AMOUNT_VS_UTXO_FACTOR) { if ((feeVsAmountRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_TX_AMOUNT_FACTOR &&
log.debug('Breaking because utxo is too small compared to tx amount'); feeVsSingleInputFeeRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_SINGLE_UTXO_FEE_FACTOR)) {
log.debug('Breaking because fee exceeded fee/amount ratio and fee is too expensive compared to single input tx');
return false; return false;
} }
} }

Loading…
Cancel
Save