Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed betting tests #217

Merged
merged 2 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libraries/chain/db_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comment.

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 > >();
Expand Down
19 changes: 11 additions & 8 deletions libraries/db/include/graphene/db/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented code. If we need to know how this was done we can refer to specific commit, pull request, etc. No need to keep it.

// 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
{
Expand Down