Skip to content

Commit 0f0ad85

Browse files
committed
voting stat plug
1 parent d22de67 commit 0f0ad85

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

libraries/plugins/voting_stat/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
file( GLOB HEADER "include/graphene/account_history/*.hpp" )
1+
file( GLOB HEADER "include/graphene/voting_stat/*.hpp" )
22

33
add_library( graphene_voting_stat voting_stat_plugin.cpp )
44

5-
target_link_libraries( graphene_voting_stat graphene_chain graphene_app )
5+
target_link_libraries( graphene_voting_stat graphene_chain graphene_app fc )
66
target_include_directories( graphene_voting_stat
77
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )
8-
8+
99
if(MSVC)
1010
set_source_files_properties( voting_stat_plugin.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
1111
endif(MSVC)
1212

1313
install( TARGETS
1414
graphene_voting_stat
15-
15+
1616
RUNTIME DESTINATION bin
1717
LIBRARY DESTINATION lib
1818
ARCHIVE DESTINATION lib )

libraries/plugins/voting_stat/include/graphene/voting_stat/voting_stat_plugin.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <graphene/chain/database.hpp>
2828

2929
namespace graphene { namespace voting_stat {
30-
using namespace chain;
3130
//
3231
// Plugins should #define their SPACE_ID's so plugins with
3332
// conflicting SPACE_ID assignments can be compiled into the
@@ -39,9 +38,15 @@ namespace graphene { namespace voting_stat {
3938
// time.
4039
//
4140
#ifndef VOTING_STAT_SPACE_ID
42-
#define VOTING_STAT_SPACE_ID 4
41+
#define VOTING_STAT_SPACE_ID 7
4342
#endif
4443

44+
enum voting_stat_object_type_ids
45+
{
46+
voting_statistics_object_type_id,
47+
voteable_statistics_object_type_id
48+
};
49+
4550
namespace detail
4651
{
4752
class voting_stat_plugin_impl;

libraries/plugins/voting_stat/voting_stat_plugin.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*/
2424
#include <graphene/voting_stat/voting_stat_plugin.hpp>
2525

26-
#include <graphene/chain/voting_statistics_object.hpp>
27-
#include <graphene/chain/voteable_statistics_object.hpp>
26+
#include <graphene/voting_stat/voting_statistics_object.hpp>
27+
#include <graphene/voting_stat/voteable_statistics_object.hpp>
2828
#include <graphene/chain/worker_object.hpp>
2929
#include <graphene/chain/witness_object.hpp>
3030
#include <graphene/chain/committee_member_object.hpp>
@@ -38,6 +38,9 @@
3838

3939
namespace graphene { namespace voting_stat {
4040

41+
using namespace graphene::chain;
42+
using graphene::db::primary_index;
43+
4144
namespace detail {
4245

4346
class voting_stat_plugin_impl

libraries/protocol/include/graphene/protocol/types.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ GRAPHENE_DEFINE_IDS(protocol, protocol_ids, /*protocol objects are not prefixed*
239239
(vesting_balance)
240240
(worker)
241241
(balance)
242-
(htlc)
243-
(voting_statistics)
244-
(voteable_statistics))
242+
(htlc))
245243

246244
FC_REFLECT(graphene::protocol::public_key_type, (key_data))
247245
FC_REFLECT(graphene::protocol::public_key_type::binary_key, (data)(check))

0 commit comments

Comments
 (0)