Skip to content

Commit

Permalink
Merge pull request bitshares#324 from bytemaster/master
Browse files Browse the repository at this point in the history
Replace flat_index with generic_index for bitasset_object
  • Loading branch information
abitmore authored Jul 10, 2017
2 parents d8e7c0a + 6780435 commit 5e67be7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions libraries/chain/db_maint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,9 @@ void database::perform_chain_maintenance(const signed_block& next_block, const g
});

// Reset all BitAsset force settlement volumes to zero
for( const asset_bitasset_data_object* d : get_index_type<asset_bitasset_data_index>() )
modify(*d, [](asset_bitasset_data_object& d) { d.force_settled_volume = 0; });
//for( const asset_bitasset_data_object* d : get_index_type<asset_bitasset_data_index>() )
for( const auto& d : get_index_type<asset_bitasset_data_index>().indices() )
modify( d, [](asset_bitasset_data_object& o) { o.force_settled_volume = 0; });

// process_budget needs to run at the bottom because
// it needs to know the next_maintenance_time
Expand Down
3 changes: 2 additions & 1 deletion libraries/chain/include/graphene/chain/asset_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ namespace graphene { namespace chain {
>
>
> asset_bitasset_data_object_multi_index_type;
typedef flat_index<asset_bitasset_data_object> asset_bitasset_data_index;
//typedef flat_index<asset_bitasset_data_object> asset_bitasset_data_index;
typedef generic_index<asset_bitasset_data_object, asset_bitasset_data_object_multi_index_type> asset_bitasset_data_index;

struct by_symbol;
struct by_type;
Expand Down

0 comments on commit 5e67be7

Please sign in to comment.