Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
transaction_object.hpp
Go to the documentation of this file.
1#pragma once
2#include <fc/io/raw.hpp>
3
5#include <fc/uint128.hpp>
6
7#include <boost/multi_index/hashed_index.hpp>
8#include <boost/multi_index/mem_fun.hpp>
9
11
12namespace sysio { namespace chain {
13 using boost::multi_index_container;
14 using namespace boost::multi_index;
20 class transaction_object : public chainbase::object<transaction_object_type, transaction_object>
21 {
23
24 id_type id;
25 time_point_sec expiration;
26 transaction_id_type trx_id; //< trx_id should not be changed within a chainbase modifier lambda
27 };
28
29 struct by_expiration;
30 struct by_trx_id;
33 indexed_by<
34 ordered_unique< tag<by_id>, BOOST_MULTI_INDEX_MEMBER(transaction_object, transaction_object::id_type, id)>,
35 ordered_unique< tag<by_trx_id>, BOOST_MULTI_INDEX_MEMBER(transaction_object, transaction_id_type, trx_id)>,
36 ordered_unique< tag<by_expiration>,
37 composite_key< transaction_object,
38 BOOST_MULTI_INDEX_MEMBER( transaction_object, time_point_sec, expiration ),
39 BOOST_MULTI_INDEX_MEMBER( transaction_object, transaction_object::id_type, id)
40 >
41 >
42 >
43 >;
44
46} }
47
49
#define OBJECT_CTOR(...)
Definition types.hpp:39
#define CHAINBASE_SET_INDEX_TYPE(OBJECT_TYPE, INDEX_TYPE)
multi_index_to_undo_index< MultiIndexType > generic_index
boost::multi_index_container< Object, Args..., chainbase::node_allocator< Object > > shared_multi_index_container
chainbase::generic_index< transaction_multi_index > transaction_index
chainbase::shared_multi_index_container< transaction_object, indexed_by< ordered_unique< tag< by_id >, BOOST_MULTI_INDEX_MEMBER(transaction_object, transaction_object::id_type, id)>, ordered_unique< tag< by_trx_id >, BOOST_MULTI_INDEX_MEMBER(transaction_object, transaction_id_type, trx_id)>, ordered_unique< tag< by_expiration >, composite_key< transaction_object, BOOST_MULTI_INDEX_MEMBER(transaction_object, time_point_sec, expiration), > > > > transaction_multi_index
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311