32 #include <boost/multi_index/composite_key.hpp>
34 namespace graphene {
namespace chain {
78 static constexpr uint32_t lock_forever_update_steps = 4;
79 static constexpr uint32_t seconds_per_lock_forever_update_step = 180 * 86400;
80 static constexpr uint32_t seconds_per_charging_step = 15 * 86400;
81 static constexpr uint32_t seconds_to_cancel_charging = 7 * 86400;
83 static constexpr uint32_t _seconds_to_downgrade[] = { 180 * 86400, 180 * 86400, 360 * 86400 };
84 return _seconds_to_downgrade[
static_cast<uint8_t
>(i) ];
87 static constexpr uint8_t _value_multiplier_v1[] = { 1, 2, 4, 8, 8, 0 };
88 static constexpr uint8_t _value_multiplier_v2[] = { 0, 2, 4, 8, 8, 0 };
89 return ( version ==
ticket_v1 ? _value_multiplier_v1[
static_cast<uint8_t
>(i) ]
90 : _value_multiplier_v2[
static_cast<uint8_t
>(i) ] );
116 struct by_next_update;
122 typedef multi_index_container<
125 ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
126 ordered_unique< tag<by_next_update>,
128 member< ticket_object, time_point_sec, &ticket_object::next_auto_update_time>,
129 member< object, object_id_type, &object::id>
132 ordered_unique< tag<by_account>,
134 member< ticket_object, account_id_type, &ticket_object::account>,
135 member< object, object_id_type, &object::id>