diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 99d17fd8..0c37b14d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,8 +34,8 @@ target_link_libraries(difficulty-tests currency_core ${CMAKE_THREAD_LIBS_INIT} e target_link_libraries(functional_tests wallet currency_core crypto common rpc zlibstatic ethash upnpc-static ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) target_link_libraries(hash-tests crypto ethash) target_link_libraries(hash-target-tests crypto currency_core ethash ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) -target_link_libraries(performance_tests currency_core common crypto zlibstatic ethash${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) -target_link_libraries(unit_tests wallet currency_core crypto common gtest_main zlibstatic ethash${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(performance_tests currency_core common crypto zlibstatic ethash ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) +target_link_libraries(unit_tests wallet currency_core crypto common gtest_main zlibstatic ethash ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) target_link_libraries(net_load_tests_clt currency_core common crypto gtest_main ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) target_link_libraries(net_load_tests_srv currency_core common crypto gtest_main ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES}) diff --git a/tests/functional_tests/core_concurrency_test.cpp b/tests/functional_tests/core_concurrency_test.cpp index 23bb8885..810c135e 100644 --- a/tests/functional_tests/core_concurrency_test.cpp +++ b/tests/functional_tests/core_concurrency_test.cpp @@ -28,7 +28,7 @@ std::atomic test_core_time::m_time_shift; #define TESTS_DEFAULT_FEE TX_DEFAULT_FEE -static std::atomic s_generated_money_total(0); +static std::atomic s_generated_money_total(0); // TODO: consiger changing to boost::multiprecision::uint128_t static size_t s_wallets_total_count = 10; // total number of wallet that will be randomly used to generate transactions //static size_t s_althchains_minimum_height = 150; // height at which althchaining is started static size_t s_tx_generation_minimum_height = 100; // height at which tx generation is started @@ -43,7 +43,7 @@ typedef std::vector> cct_wallets_t; static const std::vector empty_extra; static const std::vector empty_attachment; -bool create_block_template_manually(const currency::block& prev_block, uint64_t already_generated_coins, const std::vector& txs, const currency::account_public_address& miner_addr, currency::block& result) +bool create_block_template_manually(const currency::block& prev_block, boost::multiprecision::uint128_t already_generated_coins, const std::vector& txs, const currency::account_public_address& miner_addr, currency::block& result) { result.flags = 0; result.major_version = CURRENT_BLOCK_MAJOR_VERSION; @@ -572,7 +572,7 @@ bool core_concurrency_test(boost::program_options::variables_map& vm, size_t wth << replay_time_ms / (events.empty() ? 1 : events.size()) << " ms per event, " << events.size() << " events total", LOG_LEVEL_0); core_state_after_playback.fill(c); - uint64_t already_generated_coins = 0; + boost::multiprecision::uint128_t already_generated_coins = 0; { block_extended_info bei = AUTO_VAL_INIT(bei); c.get_blockchain_storage().get_block_extended_info_by_hash(c.get_blockchain_storage().get_top_block_id(), bei); @@ -583,7 +583,7 @@ bool core_concurrency_test(boost::program_options::variables_map& vm, size_t wth if (rthreads > 0) { s_generated_money_total = s_generated_money_total / rthreads; - LOG_PRINT("Generated coins: " << print_money(already_generated_coins) << ", counted by readers (with fee): " << print_money(s_generated_money_total), LOG_LEVEL_0); + LOG_PRINT("Generated coins: " << print_money(already_generated_coins) << ", counted by readers (with fee): " << print_money(s_generated_money_total.load()), LOG_LEVEL_0); } LOG_PRINT("Writers' stats:", LOG_LEVEL_0); diff --git a/tests/unit_tests/epee_levin_protocol_handler_async.cpp b/tests/unit_tests/epee_levin_protocol_handler_async.cpp index b256b12c..fe8260a1 100644 --- a/tests/unit_tests/epee_levin_protocol_handler_async.cpp +++ b/tests/unit_tests/epee_levin_protocol_handler_async.cpp @@ -264,7 +264,7 @@ TEST_F(positive_test_connection_to_levin_protocol_handler_calls, handler_initial TEST_F(positive_test_connection_to_levin_protocol_handler_calls, concurent_handler_initialization_and_destruction_is_correct) { const size_t connection_count = 10000; - auto create_and_destroy_connections = [this]() + auto create_and_destroy_connections = [&]() { std::vector connections(connection_count); for (size_t i = 0; i < connection_count; ++i)