diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 7bdb3ef7..97418e35 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2867,7 +2867,7 @@ int main(int argc, char* argv[]) { std::vector params; boost::split(params, arg_pos_mining_defrag_str, boost::is_any_of(",;"), boost::token_compress_on); - CHECK_AND_ASSERT_MES(params.size() != 3, EXIT_FAILURE, "incorrect number of params given: " << arg_pos_mining_defrag_str); + CHECK_AND_ASSERT_MES(params.size() == 3, EXIT_FAILURE, "incorrect number of params given: " << arg_pos_mining_defrag_str); int64_t outs_min = 0, outs_max = 0; uint64_t max_amount = 0; CHECK_AND_ASSERT_MES(epee::string_tools::string_to_num_fast(params[0], outs_min) && outs_min > 0 && outs_min < 256, EXIT_FAILURE, "incorrect param: " << params[0]); diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 0cadb402..fe7efa42 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -177,8 +177,15 @@ void wallet2::set_defragmentation_tx_settings(bool enabled, uint64_t min_outs, u m_max_utxo_count_for_defragmentation_tx = max_outs; m_max_allowed_output_amount_for_defragmentation_tx = max_allowed_amount; m_decoys_count_for_defragmentation_tx = decoys_count; - WLT_LOG_L0("Defragmentation tx creation is enabled, settings: min outs: " << min_outs << ", max outs: " << max_outs << ", max amount: " << print_money_brief(max_allowed_amount) << - ", decoys: " << (decoys_count != SIZE_MAX ? epee::string_tools::num_to_string_fast(decoys_count) : std::string("default"))); + if (enabled) + { + WLT_LOG_L0("Defragmentation tx creation is enabled, settings: min outs: " << min_outs << ", max outs: " << max_outs << ", max amount: " << print_money_brief(max_allowed_amount) << + ", decoys: " << (decoys_count != SIZE_MAX ? epee::string_tools::num_to_string_fast(decoys_count) : std::string("default"))); + } + else + { + WLT_LOG_L0("Defragmentation tx creation is disabled"); + } } //---------------------------------------------------------------------------------------------------- std::shared_ptr wallet2::get_core_proxy()