Scorum
reward_balancer_objects.hpp
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace scorum {
7 namespace chain {
8 
11 
12 template <uint16_t ObjectType, asset_symbol_type SymbolType>
13 class reward_balancer_object : public object<ObjectType, reward_balancer_object<ObjectType, SymbolType>>
14 {
15 public:
16  CHAINBASE_DEFAULT_CONSTRUCTOR(reward_balancer_object)
17 
18  typedef typename object<ObjectType, reward_balancer_object<ObjectType, SymbolType>>::id_type id_type;
19 
20 public:
21  id_type id;
22 
23  asset balance = asset(0, SymbolType);
25 };
26 
27 template <typename BalancerObjectType>
29  = shared_multi_index_container<BalancerObjectType,
30  indexed_by<ordered_unique<tag<by_id>,
31  member<BalancerObjectType,
32  typename BalancerObjectType::id_type,
33  &BalancerObjectType::id>>>>;
34 
39 
43 
44 } // namespace chain
45 } // namespace scorum
46 
50 
51 CHAINBASE_SET_INDEX_TYPE(scorum::chain::content_reward_balancer_scr_object,
53 CHAINBASE_SET_INDEX_TYPE(scorum::chain::voters_reward_balancer_scr_object,
55 CHAINBASE_SET_INDEX_TYPE(scorum::chain::voters_reward_balancer_sp_object,
object< ObjectType, reward_balancer_object< ObjectType, SymbolType > >::id_type id_type
#define SP_SYMBOL
Definition: config.hpp:104
#define SCORUM_SYMBOL
Definition: config.hpp:102
#define SCORUM_MIN_PER_BLOCK_REWARD
Definition: config.hpp:118
FC_REFLECT(appender_args,(appender)(stream)) FC_REFLECT_DERIVED(file_appender_args
reward_balancer_index< voters_reward_balancer_sp_object > voters_reward_balancer_sp_index
reward_balancer_index< voters_reward_balancer_scr_object > voters_reward_balancer_scr_index
shared_multi_index_container< BalancerObjectType, indexed_by< ordered_unique< tag< by_id >, member< BalancerObjectType, typename BalancerObjectType::id_type, &BalancerObjectType::id > >> > reward_balancer_index
reward_balancer_index< content_reward_balancer_scr_object > content_reward_balancer_scr_index
uint64_t asset_symbol_type
Definition: asset.hpp:13
Definition: asset.cpp:15