|
|
@ -1371,14 +1371,14 @@ WalletService.prototype._selectTxInputs = function(txp, utxosToExclude, cb) { |
|
|
|
} |
|
|
|
|
|
|
|
if (!_.isEmpty(bigInputs)) { |
|
|
|
if ((feeVsAmountRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_TX_AMOUNT_FACTOR && |
|
|
|
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'); |
|
|
|
if (amountVsUtxoRatio < Defaults.UTXO_SELECTION_MIN_TX_AMOUNT_VS_UTXO_FACTOR) { |
|
|
|
log.debug('Breaking because utxo is too small compared to tx amount'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (amountVsUtxoRatio < Defaults.UTXO_SELECTION_MIN_TX_AMOUNT_VS_UTXO_FACTOR) { |
|
|
|
log.debug('Breaking because utxo is too small compared to tx amount'); |
|
|
|
if ((feeVsAmountRatio > Defaults.UTXO_SELECTION_MAX_FEE_VS_TX_AMOUNT_FACTOR && |
|
|
|
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; |
|
|
|
} |
|
|
|
} |
|
|
|