BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
graphene::chain::account_statistics_object Class Reference

#include <account_object.hpp>

Inheritance diagram for graphene::chain::account_statistics_object:
graphene::db::abstract_object< account_statistics_object > graphene::db::object

Public Member Functions

bool has_some_core_voting () const
 Whether this account owns some CORE asset and is voting. More...
 
bool has_pending_fees () const
 Whether this account has pending fees, no matter vested or not. More...
 
bool need_maintenance () const
 Whether need to process this account during the maintenance interval. More...
 
void process_fees (const account_object &a, database &d) const
 Split up and pay out pending_fees and pending_vested_fees. More...
 
void pay_fee (share_type core_fee, share_type cashback_vesting_threshold)
 
- Public Member Functions inherited from graphene::db::abstract_object< account_statistics_object >
virtual unique_ptr< objectclone () const
 these methods are implemented for derived classes by inheriting abstract_object<DerivedClass> More...
 
virtual void move_from (object &obj)
 
virtual variant to_variant () const
 
virtual vector< char > pack () const
 
- Public Member Functions inherited from graphene::db::object
 object ()
 
virtual ~object ()
 

Public Attributes

account_id_type owner
 
string name
 redundantly store account name here for better maintenance performance More...
 
account_transaction_history_id_type most_recent_op
 
uint64_t total_ops = 0
 
uint64_t removed_ops = 0
 
share_type total_core_in_orders
 
share_type total_core_inactive
 Total amount of core token in inactive lock_forever tickets. More...
 
share_type total_core_pob
 Total amount of core token in active lock_forever tickets. More...
 
share_type total_core_pol
 Total amount of core token in other tickets. More...
 
share_type total_pob_value
 Total value of tickets whose current type is lock_forever. More...
 
share_type total_pol_value
 Total value of tickets whose current type is not lock_forever. More...
 
share_type core_in_balance
 
bool has_cashback_vb = false
 redundantly store this for better maintenance performance More...
 
bool is_voting = false
 redundately store "if this account is voting" for better maintenance performance More...
 
time_point_sec last_vote_time
 last time voted More...
 
share_type lifetime_fees_paid
 
share_type pending_fees
 
share_type pending_vested_fees
 
uint64_t vp_all = 0
 all voting power. More...
 
uint64_t vp_active = 0
 active voting power, if there is no attenuation, it is equal to vp_all. More...
 
uint64_t vp_committee = 0
 the final voting power for the committees. More...
 
uint64_t vp_witness = 0
 the final voting power for the witnesses. More...
 
uint64_t vp_worker = 0
 
time_point_sec vote_tally_time
 
- Public Attributes inherited from graphene::db::object
object_id_type id
 

Static Public Attributes

static constexpr uint8_t space_id = implementation_ids
 
static constexpr uint8_t type_id = impl_account_statistics_object_type
 

Detailed Description

This object contains regularly updated statistical data about an account. It is provided for the purpose of separating the account data that changes frequently from the account data that is mostly static, which will minimize the amount of data that must be backed up as part of the undo history everytime a transfer is made.

Definition at line 46 of file account_object.hpp.

Member Function Documentation

bool graphene::chain::account_statistics_object::has_pending_fees ( ) const
inline

Whether this account has pending fees, no matter vested or not.

Definition at line 137 of file account_object.hpp.

bool graphene::chain::account_statistics_object::has_some_core_voting ( ) const
inline

Whether this account owns some CORE asset and is voting.

Definition at line 110 of file account_object.hpp.

bool graphene::chain::account_statistics_object::need_maintenance ( ) const
inline

Whether need to process this account during the maintenance interval.

Definition at line 140 of file account_object.hpp.

void graphene::chain::account_statistics_object::pay_fee ( share_type  core_fee,
share_type  cashback_vesting_threshold 
)

Core fees are paid into the account_statistics_object by this method

Definition at line 100 of file account_object.cpp.

void graphene::chain::account_statistics_object::process_fees ( const account_object a,
database d 
) const

Split up and pay out pending_fees and pending_vested_fees.

Definition at line 53 of file account_object.cpp.

Member Data Documentation

share_type graphene::chain::account_statistics_object::core_in_balance

Redundantly store core balance in this object for better maintenance performance. Only updates on maintenance.

Definition at line 89 of file account_object.hpp.

bool graphene::chain::account_statistics_object::has_cashback_vb = false

redundantly store this for better maintenance performance

Definition at line 91 of file account_object.hpp.

bool graphene::chain::account_statistics_object::is_voting = false

redundately store "if this account is voting" for better maintenance performance

Definition at line 93 of file account_object.hpp.

time_point_sec graphene::chain::account_statistics_object::last_vote_time

last time voted

Definition at line 95 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::lifetime_fees_paid

Tracks the total fees paid by this account for the purpose of calculating bulk discounts.

Definition at line 119 of file account_object.hpp.

account_transaction_history_id_type graphene::chain::account_statistics_object::most_recent_op

Keep the most recent operation as a root pointer to a linked list of the transaction history.

Definition at line 59 of file account_object.hpp.

string graphene::chain::account_statistics_object::name

redundantly store account name here for better maintenance performance

Definition at line 54 of file account_object.hpp.

account_id_type graphene::chain::account_statistics_object::owner

Definition at line 52 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::pending_fees

Tracks the fees paid by this account which have not been disseminated to the various parties that receive them yet (registrar, referrer, lifetime referrer, network, etc). This is used as an optimization to avoid doing massive amounts of uint128 arithmetic on each and every operation.

These fees will be paid out as vesting cash-back, and this counter will reset during the maintenance interval.

Definition at line 129 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::pending_vested_fees

Same as pending_fees, except these fees will be paid out as pre-vested cash-back (immediately available for withdrawal) rather than requiring the normal vesting period.

Definition at line 134 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::removed_ops = 0

Total operations related to this account that has been removed from the database.

Definition at line 63 of file account_object.hpp.

constexpr uint8_t graphene::chain::account_statistics_object::space_id = implementation_ids
static

Definition at line 49 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_core_in_orders

When calculating votes it is necessary to know how much is stored in orders (and thus unavailable for transfers). Rather than maintaining an index of [asset,owner,order_id] we will simply maintain the running total here and update it every time an order is created or modified.

Definition at line 70 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_core_inactive

Total amount of core token in inactive lock_forever tickets.

Definition at line 73 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_core_pob

Total amount of core token in active lock_forever tickets.

Definition at line 76 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_core_pol

Total amount of core token in other tickets.

Definition at line 79 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::total_ops = 0

Total operations related to this account.

Definition at line 61 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_pob_value

Total value of tickets whose current type is lock_forever.

Definition at line 82 of file account_object.hpp.

share_type graphene::chain::account_statistics_object::total_pol_value

Total value of tickets whose current type is not lock_forever.

Definition at line 85 of file account_object.hpp.

constexpr uint8_t graphene::chain::account_statistics_object::type_id = impl_account_statistics_object_type
static

Definition at line 50 of file account_object.hpp.

time_point_sec graphene::chain::account_statistics_object::vote_tally_time

timestamp of the last count of votes. if there is no statistics, the date is less than _db.get_dynamic_global_properties().last_vote_tally_time.

Definition at line 106 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::vp_active = 0

active voting power, if there is no attenuation, it is equal to vp_all.

Definition at line 100 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::vp_all = 0

all voting power.

Voting Power Stats

Definition at line 99 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::vp_committee = 0

the final voting power for the committees.

Definition at line 101 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::vp_witness = 0

the final voting power for the witnesses.

Definition at line 102 of file account_object.hpp.

uint64_t graphene::chain::account_statistics_object::vp_worker = 0

the final voting power for the workers.

Definition at line 103 of file account_object.hpp.


The documentation for this class was generated from the following files: