diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h index c9a96148..f2d1abd2 100644 --- a/contrib/epee/include/misc_log_ex.h +++ b/contrib/epee/include/misc_log_ex.h @@ -116,7 +116,7 @@ DISABLE_VS_WARNINGS(4100) #define ENABLE_CHANNEL_BY_DEFAULT(ch_name) \ static bool COMBINE(init_channel, __LINE__) UNUSED_ATTRIBUTE = epee::misc_utils::static_initializer([](){ \ - epee::log_space::log_singletone::enable_channel(ch_name); return true; \ + epee::log_space::log_singletone::enable_channel(ch_name, false); return true; \ }); @@ -1239,21 +1239,24 @@ namespace log_space return genabled_channels.find(ch_name) != genabled_channels.end(); } - static void enable_channels(const std::string& channels_set) + static void enable_channels(const std::string& channels_set, bool verbose = true) { std::set& genabled_channels = get_enabled_channels(); std::list list_of_channels; boost::split(list_of_channels, channels_set, boost::is_any_of(",;: "), boost::token_compress_on); - std::cout << "log channels: "; + if (verbose) + std::cout << "log channels: "; for (const auto& ch : list_of_channels) { genabled_channels.insert(ch); - std::cout << ch << " "; + if (verbose) + std::cout << ch << " "; } - std::cout << " enabled" << std::endl; + if (verbose) + std::cout << " enabled" << std::endl; } - static void enable_channel(const std::string& ch_name) + static void enable_channel(const std::string& ch_name, bool verbose = true) { std::set& genabled_channels = get_enabled_channels(); //lazy synchronization: just replace with modified copy of whole set @@ -1261,7 +1264,8 @@ namespace log_space enabled_channels_local.insert(ch_name); genabled_channels.swap(enabled_channels_local); #ifndef ANDROID_BUILD - //std::cout << "log channel '" << ch_name << "' enabled" << std::endl; + if (verbose) + std::cout << "log channel '" << ch_name << "' enabled" << std::endl; #endif } diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index 95eaec9e..098ccd48 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -578,7 +578,7 @@ namespace currency } //--------------------------------------------------------------- - bool get_tx_fee(const transaction& tx, uint64_t & fee) + bool get_tx_fee(const transaction& tx, uint64_t& fee) { fee = 0; if (is_coinbase(tx)) @@ -607,10 +607,8 @@ namespace currency return true; // continue }; - bool r = process_type_in_variant_container(tx.extra, cb, false); - if (!r) { fee = 0; diff --git a/src/currency_core/currency_format_utils_abstract.h b/src/currency_core/currency_format_utils_abstract.h index 3d8b4226..7355c84f 100644 --- a/src/currency_core/currency_format_utils_abstract.h +++ b/src/currency_core/currency_format_utils_abstract.h @@ -218,7 +218,6 @@ namespace currency catch(...) { // should never go here, just precaution - return false; } return false; diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 43f1efe6..d9ea6f6c 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -125,7 +125,7 @@ int main(int argc, char* argv[]) #endif log_space::get_set_log_detalisation_level(true, LOG_LEVEL_0); log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL); - log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,wallet"); + log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,wallet", false); LOG_PRINT_L0("Starting..."); tools::signal_handler::install_fatal([](int sig_number, void* address) { diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp index 2e7914fb..d628446e 100644 --- a/src/wallet/plain_wallet_api.cpp +++ b/src/wallet/plain_wallet_api.cpp @@ -130,7 +130,7 @@ namespace plain_wallet log_dir += "/" LOGS_FOLDER; log_space::get_set_need_thread_id(true, true); - log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,p2p,wallet"); + log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,p2p,wallet", false); epee::log_space::get_set_log_detalisation_level(true, log_level); #ifdef ANDROID_BUILD epee::log_space::log_singletone::add_logger(new android_logger()); diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index a630312e..52ff03ee 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -252,9 +252,6 @@ namespace tools const currency::tx_destination_entry& change_dst, uint64_t dust_threshold, std::vector& splitted_dsts, uint64_t& dust, uint64_t max_output_allowed) { - //&&&&& - LOG_PRINT_MAGENTA("[--apply_split_strategy_by_id, split strtegy_id: " << id, LOG_LEVEL_0); - switch (id) { case ssi_digit: diff --git a/tests/core_tests/chaingen_main.cpp b/tests/core_tests/chaingen_main.cpp index b0638233..7086798f 100644 --- a/tests/core_tests/chaingen_main.cpp +++ b/tests/core_tests/chaingen_main.cpp @@ -658,7 +658,7 @@ int main(int argc, char* argv[]) log_space::log_singletone::get_default_log_file().c_str(), log_space::log_singletone::get_default_log_folder().c_str()); - log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,p2p,wallet"); + log_space::log_singletone::enable_channels("core,currency_protocol,tx_pool,p2p,wallet", false); tools::signal_handler::install_fatal([](int sig_number, void* address) { LOG_ERROR("\n\nFATAL ERROR\nsig: " << sig_number << ", address: " << address); diff --git a/tests/functional_tests/crypto_tests_ml2s.h b/tests/functional_tests/crypto_tests_ml2s.h index b18997a9..c38c8d13 100644 --- a/tests/functional_tests/crypto_tests_ml2s.h +++ b/tests/functional_tests/crypto_tests_ml2s.h @@ -64,7 +64,7 @@ TEST(ml2s, hs) x = 0; crypto::hash h; - scalar_t r; + //scalar_t r; sha3(0, 0, &h, sizeof h); LOG_PRINT("SHA3() -> " << h, LOG_LEVEL_0); diff --git a/tests/unit_tests/db_tests.cpp b/tests/unit_tests/db_tests.cpp index fcf5bac0..61a0ae19 100644 --- a/tests/unit_tests/db_tests.cpp +++ b/tests/unit_tests/db_tests.cpp @@ -986,7 +986,7 @@ namespace db_test bool r = false; epee::shared_recursive_mutex rw_lock; - epee::log_space::log_singletone::enable_channels("lmdb"); + epee::log_space::log_singletone::enable_channels("lmdb", false); static const uint64_t buffer_size = 64 * 1024; // 64 KB static const uint64_t db_total_size = static_cast(2.1 * 1024 * 1024 * 1024); // 2.1 GB -- a bit more than 2GB to test 2GB boundary