Bitshares-Core  2.0.181105
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:

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 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 core_in_balance = 0
 redundantly store core balance here for better maintenance performance More...
 
bool has_cashback_vb = false
 redundantly store this for better maintenance performance More...
 
bool is_voting = false
 redundately store whether this account is voting for better maintenance performance More...
 
share_type lifetime_fees_paid
 
share_type pending_fees
 
share_type pending_vested_fees
 

Static Public Attributes

static const uint8_t space_id = implementation_ids
 
static const 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 41 of file account_object.hpp.

Member Function Documentation

◆ has_pending_fees()

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 100 of file account_object.hpp.

◆ has_some_core_voting()

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 74 of file account_object.hpp.

◆ need_maintenance()

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

Whether need to process this account during the maintenance interval.

Definition at line 103 of file account_object.hpp.

◆ pay_fee()

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 107 of file account_object.cpp.

◆ process_fees()

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

◆ core_in_balance

share_type graphene::chain::account_statistics_object::core_in_balance = 0

redundantly store core balance here for better maintenance performance

Definition at line 67 of file account_object.hpp.

◆ has_cashback_vb

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

redundantly store this for better maintenance performance

Definition at line 69 of file account_object.hpp.

◆ is_voting

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

redundately store whether this account is voting for better maintenance performance

Definition at line 71 of file account_object.hpp.

◆ lifetime_fees_paid

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 82 of file account_object.hpp.

◆ most_recent_op

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 54 of file account_object.hpp.

◆ name

string graphene::chain::account_statistics_object::name

redundantly store account name here for better maintenance performance

Definition at line 49 of file account_object.hpp.

◆ owner

account_id_type graphene::chain::account_statistics_object::owner

Definition at line 47 of file account_object.hpp.

◆ pending_fees

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 92 of file account_object.hpp.

◆ pending_vested_fees

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 97 of file account_object.hpp.

◆ removed_ops

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 58 of file account_object.hpp.

◆ space_id

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

Definition at line 44 of file account_object.hpp.

◆ total_core_in_orders

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 65 of file account_object.hpp.

◆ total_ops

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

Total operations related to this account.

Definition at line 56 of file account_object.hpp.

◆ type_id

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

Definition at line 45 of file account_object.hpp.


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