db_balance.cpp: Rename by_balance -> by_account_asset #529
This commit is contained in:
parent
3edaf15652
commit
600a06f57e
2 changed files with 4 additions and 4 deletions
|
|
@ -33,7 +33,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
asset database::get_balance(account_id_type owner, asset_id_type asset_id) const
|
||||
{
|
||||
auto& index = get_index_type<account_balance_index>().indices().get<by_balance>();
|
||||
auto& index = get_index_type<account_balance_index>().indices().get<by_account_asset>();
|
||||
auto itr = index.find(boost::make_tuple(owner, asset_id));
|
||||
if( itr == index.end() )
|
||||
return asset(0, asset_id);
|
||||
|
|
@ -55,7 +55,7 @@ void database::adjust_balance(account_id_type account, asset delta )
|
|||
if( delta.amount == 0 )
|
||||
return;
|
||||
|
||||
auto& index = get_index_type<account_balance_index>().indices().get<by_balance>();
|
||||
auto& index = get_index_type<account_balance_index>().indices().get<by_account_asset>();
|
||||
auto itr = index.find(boost::make_tuple(account, delta.asset_id));
|
||||
if(itr == index.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
struct by_asset;
|
||||
struct by_account;
|
||||
struct by_balance;
|
||||
struct by_account_asset;
|
||||
/**
|
||||
* @ingroup object_index
|
||||
*/
|
||||
|
|
@ -299,7 +299,7 @@ namespace graphene { namespace chain {
|
|||
account_balance_object,
|
||||
indexed_by<
|
||||
ordered_unique< tag<by_id>, member< object, object_id_type, &object::id > >,
|
||||
ordered_unique< tag<by_balance>, composite_key<
|
||||
ordered_unique< tag<by_account_asset>, composite_key<
|
||||
account_balance_object,
|
||||
member<account_balance_object, account_id_type, &account_balance_object::owner>,
|
||||
member<account_balance_object, asset_id_type, &account_balance_object::asset_type> >
|
||||
|
|
|
|||
Loading…
Reference in a new issue