From f7fa8cf77527cf0b7bb1bb0d49bb23120380a6da Mon Sep 17 00:00:00 2001 From: Nathan Hourt Date: Fri, 19 Apr 2019 17:11:28 -0500 Subject: [PATCH] Ref #1506: Move ID types from db to protocol The ID types, object_id and object_id_type, were defined in the db library, and the protocol library depends on db to get these types. Technically, the ID types are defined by the protocol and used by the database, and not vice versa. Therefore these types should be in the protocol library, and db should depend on protocol to get them. This commit makes it so. --- libraries/db/CMakeLists.txt | 2 +- libraries/db/include/graphene/db/object.hpp | 2 +- libraries/protocol/CMakeLists.txt | 2 +- .../db => protocol/include/graphene/protocol}/object_id.hpp | 0 libraries/protocol/include/graphene/protocol/types.hpp | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename libraries/{db/include/graphene/db => protocol/include/graphene/protocol}/object_id.hpp (100%) diff --git a/libraries/db/CMakeLists.txt b/libraries/db/CMakeLists.txt index 6feb985c6f..b0899d8683 100644 --- a/libraries/db/CMakeLists.txt +++ b/libraries/db/CMakeLists.txt @@ -1,6 +1,6 @@ file(GLOB HEADERS "include/graphene/db/*.hpp") add_library( graphene_db undo_database.cpp index.cpp object_database.cpp ${HEADERS} ) -target_link_libraries( graphene_db fc ) +target_link_libraries( graphene_db graphene_protocol fc ) target_include_directories( graphene_db PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ) install( TARGETS diff --git a/libraries/db/include/graphene/db/object.hpp b/libraries/db/include/graphene/db/object.hpp index c410e273ee..6da932b029 100644 --- a/libraries/db/include/graphene/db/object.hpp +++ b/libraries/db/include/graphene/db/object.hpp @@ -22,7 +22,7 @@ * THE SOFTWARE. */ #pragma once -#include +#include #include #include #include diff --git a/libraries/protocol/CMakeLists.txt b/libraries/protocol/CMakeLists.txt index eb91de4b06..e1be1fb6d8 100644 --- a/libraries/protocol/CMakeLists.txt +++ b/libraries/protocol/CMakeLists.txt @@ -29,7 +29,7 @@ list(APPEND SOURCES account.cpp add_library( graphene_protocol ${SOURCES} ${HEADERS} ) -target_link_libraries( graphene_protocol graphene_db fc ) +target_link_libraries( graphene_protocol fc ) target_include_directories( graphene_protocol PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" ) install( TARGETS diff --git a/libraries/db/include/graphene/db/object_id.hpp b/libraries/protocol/include/graphene/protocol/object_id.hpp similarity index 100% rename from libraries/db/include/graphene/db/object_id.hpp rename to libraries/protocol/include/graphene/protocol/object_id.hpp diff --git a/libraries/protocol/include/graphene/protocol/types.hpp b/libraries/protocol/include/graphene/protocol/types.hpp index 9dd290c7b2..429a5ed671 100644 --- a/libraries/protocol/include/graphene/protocol/types.hpp +++ b/libraries/protocol/include/graphene/protocol/types.hpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include