From 79f742af5c619cef67c56afbc479934406bd6493 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 12 Sep 2023 13:32:57 -0500 Subject: [PATCH 1/3] Cleanup unnecessary dependency on chain_plugin. --- tests/trx_generator/CMakeLists.txt | 4 ++-- tests/trx_generator/main.cpp | 2 +- tests/trx_generator/trx_generator.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/trx_generator/CMakeLists.txt b/tests/trx_generator/CMakeLists.txt index fab2a72eeb..957dcebe58 100644 --- a/tests/trx_generator/CMakeLists.txt +++ b/tests/trx_generator/CMakeLists.txt @@ -2,9 +2,9 @@ add_executable(trx_generator main.cpp trx_generator.cpp trx_provider.cpp) target_include_directories(trx_generator PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(trx_generator PRIVATE eosio_chain fc chain_plugin ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) +target_link_libraries(trx_generator PRIVATE eosio_chain fc Boost::program_options ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) add_executable(trx_generator_tests trx_generator_tests.cpp trx_provider.cpp trx_generator.cpp) -target_link_libraries(trx_generator_tests PRIVATE eosio_chain fc chain_plugin ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) +target_link_libraries(trx_generator_tests PRIVATE eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) target_include_directories(trx_generator_tests PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) add_test(trx_generator_tests trx_generator_tests) diff --git a/tests/trx_generator/main.cpp b/tests/trx_generator/main.cpp index 60c20e3f7e..fab8fba31c 100644 --- a/tests/trx_generator/main.cpp +++ b/tests/trx_generator/main.cpp @@ -1,7 +1,7 @@ -#include #include #include #include +#include #include #include #include diff --git a/tests/trx_generator/trx_generator.cpp b/tests/trx_generator/trx_generator.cpp index dda297422f..a78a223b0e 100644 --- a/tests/trx_generator/trx_generator.cpp +++ b/tests/trx_generator/trx_generator.cpp @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -235,7 +234,7 @@ namespace eosio::testing { stop_generation(); ilog("Create Initial Transaction with action data."); - _abi = abi_serializer(fc::json::from_file(_usr_trx_config._abi_data_file_path).as(), abi_serializer::create_yield_function( abi_serializer_max_time )); + _abi = chain::abi_serializer(fc::json::from_file(_usr_trx_config._abi_data_file_path).as(), chain::abi_serializer::create_yield_function( abi_serializer_max_time )); fc::variant unpacked_actions_data_json = json_from_file_or_string(_usr_trx_config._actions_data_json_file_or_str); fc::variant unpacked_actions_auths_data_json = json_from_file_or_string(_usr_trx_config._actions_auths_json_file_or_str); ilog("Loaded actions data: ${data}", ("data", fc::json::to_pretty_string(unpacked_actions_data_json))); From 785e5afe437d1bd2633b05d96d16543e7bd1a3a8 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 12 Sep 2023 14:32:28 -0500 Subject: [PATCH 2/3] Add find_package. --- tests/trx_generator/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/trx_generator/CMakeLists.txt b/tests/trx_generator/CMakeLists.txt index 957dcebe58..7c32d74cf1 100644 --- a/tests/trx_generator/CMakeLists.txt +++ b/tests/trx_generator/CMakeLists.txt @@ -1,3 +1,5 @@ +find_package(Boost 1.67 REQUIRED COMPONENTS program_options) + add_executable(trx_generator main.cpp trx_generator.cpp trx_provider.cpp) target_include_directories(trx_generator PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) From fc64e0f7fdd47e5c376929370a4d826c7e201c21 Mon Sep 17 00:00:00 2001 From: Peter Oschwald Date: Tue, 12 Sep 2023 15:23:18 -0500 Subject: [PATCH 3/3] Add Boost::program_options to target_link_libraries for trx_generator_tests as well. Move include from hpp into cpp. Remove find_package. --- tests/trx_generator/CMakeLists.txt | 4 +--- tests/trx_generator/trx_generator.cpp | 1 + tests/trx_generator/trx_generator.hpp | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/trx_generator/CMakeLists.txt b/tests/trx_generator/CMakeLists.txt index 7c32d74cf1..d1946a156b 100644 --- a/tests/trx_generator/CMakeLists.txt +++ b/tests/trx_generator/CMakeLists.txt @@ -1,5 +1,3 @@ -find_package(Boost 1.67 REQUIRED COMPONENTS program_options) - add_executable(trx_generator main.cpp trx_generator.cpp trx_provider.cpp) target_include_directories(trx_generator PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) @@ -7,6 +5,6 @@ target_include_directories(trx_generator PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CM target_link_libraries(trx_generator PRIVATE eosio_chain fc Boost::program_options ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) add_executable(trx_generator_tests trx_generator_tests.cpp trx_provider.cpp trx_generator.cpp) -target_link_libraries(trx_generator_tests PRIVATE eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) +target_link_libraries(trx_generator_tests PRIVATE eosio_chain fc Boost::program_options ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS}) target_include_directories(trx_generator_tests PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) add_test(trx_generator_tests trx_generator_tests) diff --git a/tests/trx_generator/trx_generator.cpp b/tests/trx_generator/trx_generator.cpp index a78a223b0e..f3c57082ca 100644 --- a/tests/trx_generator/trx_generator.cpp +++ b/tests/trx_generator/trx_generator.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/tests/trx_generator/trx_generator.hpp b/tests/trx_generator/trx_generator.hpp index 1112444777..83736cd83b 100644 --- a/tests/trx_generator/trx_generator.hpp +++ b/tests/trx_generator/trx_generator.hpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include