Skip to content

Commit

Permalink
Merge pull request #551 from oxarbitrage/change-proposal-index
Browse files Browse the repository at this point in the history
change proposal index from non unique to unique composite key
  • Loading branch information
oxarbitrage committed Dec 26, 2017
2 parents 10a15ca + f170f52 commit bb275db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libraries/chain/include/graphene/chain/proposal_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <graphene/chain/transaction_evaluation_state.hpp>

#include <graphene/db/generic_index.hpp>
#include <boost/multi_index/composite_key.hpp>

namespace graphene { namespace chain {

Expand Down Expand Up @@ -83,7 +84,13 @@ typedef boost::multi_index_container<
proposal_object,
indexed_by<
ordered_unique< tag< by_id >, member< object, object_id_type, &object::id > >,
ordered_non_unique< tag< by_expiration >, member< proposal_object, time_point_sec, &proposal_object::expiration_time > >
//ordered_non_unique< tag< by_expiration >, member< proposal_object, time_point_sec, &proposal_object::expiration_time > >
ordered_unique<tag<by_expiration>,
composite_key<proposal_object,
member<proposal_object, time_point_sec, &proposal_object::expiration_time>,
member< object, object_id_type, &object::id >
>
>
>
> proposal_multi_index_container;
typedef generic_index<proposal_object, proposal_multi_index_container> proposal_index;
Expand Down

0 comments on commit bb275db

Please sign in to comment.