Skip to content

Commit

Permalink
removed circular dependency between ametsuchi & pg_connection_init
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Boldyrev <miboldyrev@gmail.com>
  • Loading branch information
MBoldyrev authored and Igor Egorov committed Aug 13, 2019
1 parent 29008a0 commit ac23884
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion irohad/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ target_link_libraries(raw_block_loader

add_library(pg_connection_init impl/pg_connection_init.cpp)
target_link_libraries(pg_connection_init
ametsuchi
SOCI::postgresql
SOCI::core
failover_callback
Expand Down
1 change: 1 addition & 0 deletions irohad/main/impl/pg_connection_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "main/impl/pg_connection_init.hpp"

#include "ametsuchi/impl/pool_wrapper.hpp"
#include "logger/logger.hpp"
#include "logger/logger_manager.hpp"

Expand Down
4 changes: 3 additions & 1 deletion irohad/main/impl/pg_connection_init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <boost/range/algorithm/replace_if.hpp>

#include "ametsuchi/impl/failover_callback_holder.hpp"
#include "ametsuchi/impl/pool_wrapper.hpp"
#include "ametsuchi/impl/postgres_command_executor.hpp"
#include "ametsuchi/impl/postgres_options.hpp"
#include "ametsuchi/reconnection_strategy.hpp"
Expand All @@ -25,6 +24,9 @@

namespace iroha {
namespace ametsuchi {

struct PoolWrapper;

class PgConnectionInit {
public:
static expected::Result<std::shared_ptr<soci::connection_pool>,
Expand Down
1 change: 1 addition & 0 deletions test/system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

addtest(irohad_test irohad_test.cpp)
target_link_libraries(irohad_test
ametsuchi
boost
SOCI::postgresql
SOCI::core
Expand Down
1 change: 1 addition & 0 deletions test/system/irohad_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <boost/process.hpp>
#include <boost/variant.hpp>

#include "ametsuchi/impl/postgres_options.hpp"
#include "backend/protobuf/query_responses/proto_query_response.hpp"
#include "common/bind.hpp"
#include "common/files.hpp"
Expand Down

0 comments on commit ac23884

Please sign in to comment.