Skip to content

Commit

Permalink
Ref bitshares#1506: Move ID types from db to protocol
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nathanielhourt committed Apr 26, 2019
1 parent efa47d2 commit 3e8ec6a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libraries/db/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion libraries/db/include/graphene/db/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#pragma once
#include <graphene/db/object_id.hpp>
#include <graphene/protocol/object_id.hpp>
#include <fc/io/raw.hpp>
#include <fc/crypto/city.hpp>
#include <fc/uint128.hpp>
Expand Down
2 changes: 1 addition & 1 deletion libraries/protocol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libraries/protocol/include/graphene/protocol/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <deque>
#include <cstdint>
#include <graphene/protocol/address.hpp>
#include <graphene/db/object_id.hpp>
#include <graphene/protocol/object_id.hpp>
#include <graphene/protocol/config.hpp>

#include <boost/rational.hpp>
Expand Down

0 comments on commit 3e8ec6a

Please sign in to comment.