From 5afc74d4f68d42ed063eb357d0a0b0acfb226b04 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Wed, 9 Mar 2016 10:18:13 -0300 Subject: [PATCH] revert breaking conditions for small inputs to improve tracing --- lib/server.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/server.js b/lib/server.js index 76bad80..2907fea 100644 --- a/lib/server.js +++ b/lib/server.js @@ -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; } }