Scorum
transaction_object.hpp
Go to the documentation of this file.
1 #pragma once
3 
5 
6 #include <boost/multi_index/hashed_index.hpp>
7 
8 namespace scorum {
9 namespace chain {
10 
12 
18 class transaction_object : public object<transaction_object_type, transaction_object>
19 {
20 public:
21  CHAINBASE_DEFAULT_DYNAMIC_CONSTRUCTOR(transaction_object, (packed_trx))
22 
23  id_type id;
24 
25  fc::shared_buffer packed_trx;
27  time_point_sec expiration;
28 };
29 
30 struct by_expiration;
31 struct by_trx_id;
32 typedef shared_multi_index_container<transaction_object,
33  indexed_by<ordered_unique<tag<by_id>,
34  member<transaction_object,
36  &transaction_object::id>>,
37  hashed_unique<tag<by_trx_id>,
38  BOOST_MULTI_INDEX_MEMBER(
40  std::hash<transaction_id_type>>,
41  ordered_non_unique<tag<by_expiration>,
42  member<transaction_object,
43  time_point_sec,
46 }
47 } // scorum::chain
48 
50 CHAINBASE_SET_INDEX_TYPE(scorum::chain::transaction_object, scorum::chain::transaction_index)
FC_REFLECT(appender_args,(appender)(stream)) FC_REFLECT_DERIVED(file_appender_args
Definition: game.cpp:4
shared_multi_index_container< transaction_object, indexed_by< ordered_unique< tag< by_id >, member< transaction_object, transaction_object_id_type, &transaction_object::id > >, hashed_unique< tag< by_trx_id >, BOOST_MULTI_INDEX_MEMBER(transaction_object, transaction_id_type, trx_id), std::hash< transaction_id_type > >, ordered_non_unique< tag< by_expiration >, member< transaction_object, time_point_sec, &transaction_object::expiration > > > > transaction_index
fc::ripemd160 transaction_id_type
Definition: types.hpp:65
Definition: asset.cpp:15