Skip to content

Commit

Permalink
voting stat plug
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimfred committed Sep 10, 2019
1 parent d22de67 commit 0f0ad85
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions libraries/plugins/voting_stat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
file( GLOB HEADER "include/graphene/account_history/*.hpp" )
file( GLOB HEADER "include/graphene/voting_stat/*.hpp" )

add_library( graphene_voting_stat voting_stat_plugin.cpp )

target_link_libraries( graphene_voting_stat graphene_chain graphene_app )
target_link_libraries( graphene_voting_stat graphene_chain graphene_app fc )
target_include_directories( graphene_voting_stat
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )

if(MSVC)
set_source_files_properties( voting_stat_plugin.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
endif(MSVC)

install( TARGETS
graphene_voting_stat

RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <graphene/chain/database.hpp>

namespace graphene { namespace voting_stat {
using namespace chain;
//
// Plugins should #define their SPACE_ID's so plugins with
// conflicting SPACE_ID assignments can be compiled into the
Expand All @@ -39,9 +38,15 @@ namespace graphene { namespace voting_stat {
// time.
//
#ifndef VOTING_STAT_SPACE_ID
#define VOTING_STAT_SPACE_ID 4
#define VOTING_STAT_SPACE_ID 7
#endif

enum voting_stat_object_type_ids
{
voting_statistics_object_type_id,
voteable_statistics_object_type_id
};

namespace detail
{
class voting_stat_plugin_impl;
Expand Down
7 changes: 5 additions & 2 deletions libraries/plugins/voting_stat/voting_stat_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
#include <graphene/voting_stat/voting_stat_plugin.hpp>

#include <graphene/chain/voting_statistics_object.hpp>
#include <graphene/chain/voteable_statistics_object.hpp>
#include <graphene/voting_stat/voting_statistics_object.hpp>
#include <graphene/voting_stat/voteable_statistics_object.hpp>
#include <graphene/chain/worker_object.hpp>
#include <graphene/chain/witness_object.hpp>
#include <graphene/chain/committee_member_object.hpp>
Expand All @@ -38,6 +38,9 @@

namespace graphene { namespace voting_stat {

using namespace graphene::chain;
using graphene::db::primary_index;

namespace detail {

class voting_stat_plugin_impl
Expand Down
4 changes: 1 addition & 3 deletions libraries/protocol/include/graphene/protocol/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ GRAPHENE_DEFINE_IDS(protocol, protocol_ids, /*protocol objects are not prefixed*
(vesting_balance)
(worker)
(balance)
(htlc)
(voting_statistics)
(voteable_statistics))
(htlc))

FC_REFLECT(graphene::protocol::public_key_type, (key_data))
FC_REFLECT(graphene::protocol::public_key_type::binary_key, (data)(check))
Expand Down

0 comments on commit 0f0ad85

Please sign in to comment.