Fixed betting tests

This commit is contained in:
Sandip Patel 2019-11-11 16:22:29 +05:30
parent e4eb3e6ce3
commit ab0281c51b
2 changed files with 15 additions and 9 deletions

View file

@ -263,7 +263,10 @@ void database::initialize_indexes()
acnt_index->add_secondary_index<account_referrer_index>();
add_index< primary_index<committee_member_index, 8> >(); // 256 members per chunk
add_index< primary_index<son_index, 8> >(); // 256 sons per chunk
// Note: Do not create secondary_index if you will need to create an
// operation to remove associated object.
add_index< primary_index<son_index> >();
add_index< primary_index<witness_index, 10> >(); // 1024 witnesses per chunk
add_index< primary_index<limit_order_index > >();
add_index< primary_index<call_order_index > >();

View file

@ -402,14 +402,17 @@ namespace graphene { namespace db {
DerivedIndex::remove(obj);
}
virtual const object& insert( object&& obj )override
{
const auto& res = DerivedIndex::insert(std::move(obj));
for( const auto& item : _sindex )
item->object_inserted( res );
on_add(res);
return res;
}
// Note: Implementing insert function here will break the
// bookie_plugin functionality as it was implemented assuming no undo required.
// virtual const object& insert( object&& obj )override
// {
// const auto& res = DerivedIndex::insert(std::move(obj));
// if (object_type_id() != graphene::)
// for( const auto& item : _sindex )
// item->object_inserted( res );
// on_add(res);
// return res;
// }
virtual void modify( const object& obj, const std::function<void(object&)>& m )override
{