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

Tracks the balance of a single account/asset pairThis object is indexed on owner and asset_type so that black swan events in asset_type can be processed quickly. More...

#include <account_object.hpp>

Inheritance diagram for graphene::chain::account_balance_object:
graphene::db::abstract_object< account_balance_object, implementation_ids, impl_account_balance_object_type > graphene::db::base_abstract_object< account_balance_object > graphene::db::object

Public Member Functions

asset get_balance () const
 
void adjust_balance (const asset &delta)
 
- Public Member Functions inherited from graphene::db::abstract_object< account_balance_object, implementation_ids, impl_account_balance_object_type >
 abstract_object ()
 
object_id< SpaceID, TypeID > get_id () const
 
- Public Member Functions inherited from graphene::db::base_abstract_object< account_balance_object >
std::unique_ptr< objectclone () const override
 
void move_from (object &obj) override
 
fc::variant to_variant () const override
 
std::vector< char > pack () const override
 
- Public Member Functions inherited from graphene::db::object
 object ()=default
 
 object (uint8_t space_id, uint8_t type_id)
 
virtual ~object ()=default
 

Public Attributes

account_id_type owner
 
asset_id_type asset_type
 
share_type balance
 
bool maintenance_flag = false
 Whether need to process this balance object in maintenance interval. More...
 
- Public Attributes inherited from graphene::db::object
object_id_type id
 

Additional Inherited Members

- Static Public Attributes inherited from graphene::db::abstract_object< account_balance_object, implementation_ids, impl_account_balance_object_type >
static constexpr uint8_t space_id
 
static constexpr uint8_t type_id
 

Detailed Description

Tracks the balance of a single account/asset pair

This object is indexed on owner and asset_type so that black swan events in asset_type can be processed quickly.

Definition at line 157 of file account_object.hpp.

Member Function Documentation

◆ adjust_balance()

void graphene::chain::account_balance_object::adjust_balance ( const asset delta)

Definition at line 45 of file account_object.cpp.

◆ get_balance()

asset graphene::chain::account_balance_object::get_balance ( ) const
inline

Definition at line 167 of file account_object.hpp.

Member Data Documentation

◆ asset_type

asset_id_type graphene::chain::account_balance_object::asset_type

Definition at line 162 of file account_object.hpp.

◆ balance

share_type graphene::chain::account_balance_object::balance

Definition at line 163 of file account_object.hpp.

◆ maintenance_flag

bool graphene::chain::account_balance_object::maintenance_flag = false

Whether need to process this balance object in maintenance interval.

Definition at line 165 of file account_object.hpp.

◆ owner

account_id_type graphene::chain::account_balance_object::owner

Definition at line 161 of file account_object.hpp.


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